src/aria/ext/StressCss.js
function (selector, incremental) {
        if (!selector) {
            // This is a baseline
            if (incremental) {
                // Everything should be removed
                refreshCSS(true);
            } else {
                // Nothing should be removed
                return;
            }
        } else {
            var textLoaded = aria.templates.CSSMgr.__textLoaded[selector.location];
            // remember the original text
            selector.original = textLoaded.text;
            if (incremental) {
                // Keep only the selector
                refreshCSS(true, selector.descriptor);
            } else {
                // Remove the selector
                textLoaded.text = textLoaded.text.replace(selector.descriptor, "");
                refreshCSS();
            }
        }
    }
function (selector, incremental) {
        if (!selector) {
            // This is a baseline
            if (incremental) {
                // Everything should be removed
                refreshCSS(true);
            } else {
                // Nothing should be removed
                return;
            }
        } else {
            var textLoaded = aria.templates.CSSMgr.__textLoaded[selector.location];
            // remember the original text
            selector.original = textLoaded.text;
            if (incremental) {
                // Keep only the selector
                refreshCSS(true, selector.descriptor);
            } else {
                // Remove the selector
                textLoaded.text = textLoaded.text.replace(selector.descriptor, "");
                refreshCSS();
            }
        }
    }
function ( selector , incremental ) { if ( ! selector ) { // This is a baseline if ( incremental ) { // Everything should be removed refreshCSS ( true ) ; } else { // Nothing should be removed return ; } } else { var textLoaded = aria . templates . CSSMgr . __textLoaded [ selector . location ] ; // remember the original text selector . original = textLoaded . text ; if ( incremental ) { // Keep only the selector refreshCSS ( true , selector . descriptor ) ; } else { // Remove the selector textLoaded . text = textLoaded . text . replace ( selector . descriptor , "" ) ; refreshCSS ( ) ; } } }
Remove a selector from the page.
@param {Object} selector CSS selector as returned by
@param {Boolean} incremental If true all selectors except "selector" are removed, otherwise only "selector" is
removed
@see extractSelectors
Remove a selector from the page .