Detect AttaShadow Event

I'd like to detect an event of attaching shadow to the host element. Use-case: using MutationObserver to watch any DOM changes and post-process the changed content as part of binding (tying) framework's logic. Why do I need to detect this event? In o

How to change the HTML content being loaded on the page

I do A/B Testing on our site and I do most of my work is in a JS file that is loaded at the top of the page before anything else is rendered but after jQuery has loaded which comes in handy at times. Taking a very simple example of changing an H1 tag

Chrome extension: Waiting for the item to load (async js)

I have a Chrome extension, and I want to wait until an element is loaded before injecting content into the page. I'm trying to inject a button: myButton = document.createElement('button'); myButton.class = 'mybutton'; document.querySelector('.element

Javascript: mutationobserver is not a warning message

I am trying to detect the css property changes in an element. I searched online and found mutationobserver javascript api. but in my test script it is not working as expected( it's not alerting the property name and property value). var foo = documen

MutationObserver does not receive all updates

I have the following code inside a chrome extension: var observer = new MutationObserver(function (mutations) { mutations.forEach(function (mutation) { if (mutation.type === "childList") { Log.Debug("mutation: Childlist:"+mutation.adde

Join a javascript / jquery event on dynamically created items

I've seen a lot of different questions similar to this, but all of them generally targeted a specific selector. Please let me know if there is a duplicate somewhere and I've missed it. Take this scenario: You want to build a jquery plugin for a wordp

Monitor the creation of element in the Greasemonkey script?

I need to be notified when an element with class 'nav' is created as the document is loading. Googling I found MutationObservers and thought they would be perfect, but I can't seem to get it working. // ==UserScript== // @name ii-shortcuts // @namesp

Availability of MutationObservers in Internet Explorer

AFAIK mutation observers are not available yet in IE. Chrome, Safari, Firefox have their implementations and its working its way through the standardization process. I'm wondering if anyone (preferably MS employee) knows the story with IE, or might g

Can jQuery selectors be used with observers of DOM mutations?

HTML5 includes a concept of "mutation observers" to monitor changes to the browser's DOM. Your observer callback will be passed data which looks a lot like DOM tree snippets. I don't know if they are exactly this or how they work really. But whe