examples/dist/common.js
function makeRequestCallFromMutationObserver(callback) {
    var toggle = 1;
    var observer = new BrowserMutationObserver(callback);
    var node = document.createTextNode("");
    observer.observe(node, {characterData: true});
    return function requestCall() {
        toggle = -toggle;
        node.data = toggle;
    };
}
function makeRequestCallFromMutationObserver(callback) {
    var toggle = 1;
    var observer = new BrowserMutationObserver(callback);
    var node = document.createTextNode("");
    observer.observe(node, {characterData: true});
    return function requestCall() {
        toggle = -toggle;
        node.data = toggle;
    };
}
function makeRequestCallFromMutationObserver ( callback ) { var toggle = 1 ; var observer = new BrowserMutationObserver ( callback ) ; var node = document . createTextNode ( "" ) ; observer . observe ( node , { characterData : true } ) ; return function requestCall ( ) { toggle = - toggle ; node . data = toggle ; } ; }
To request a high priority event, we induce a mutation observer by toggling the text of a text node between "1" and "-1".
To request a high priority event we induce a mutation observer by toggling the text of a text node between 1 and - 1 .