Each object that implements the WindowTimers interface has a list of active timers. Each entry in this lists is identified by a number, which must be unique within the list for the lifetime of the object that implements the WindowTimers interface.
link=document.createElement('link');
link.href='href';
link.rel='rel';
document.getElementsByTagName('head')[0].appendChild(link);
// выбираем нужный элемент
var target = document.querySelector('#some-id');
// если jQuery
var target = $('#some-id')[0];
// создаем новый экземпляр наблюдателя
var observer = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
console.log(mutation.type);
});
});
// создаем конфигурации для наблюдателя
var config = { attributes: true, childList: true, characterData: true };
// запускаем механизм наблюдения
observer.observe(target, config);
// позже, если надо, прекращаем наблюдение
observer.disconnect();