Constant Field Values

Contents

com.deque.*

  • com.deque.html.axecore.selenium.AxeBuilder 
    Modifier and Type Constant Field Value
    public final String axeRunScript "var callback = arguments[arguments.length - 1];var context = typeof arguments[0] === \'string\' ? JSON.parse(arguments[0]) : arguments[0];context = context || document;var options = JSON.parse(arguments[1]);axe.run(context, options, function (err, results) { { if (err) { results = { violations: [], passes: [], url: \'\', timestamp: new Date().toString(), errorMessage: err.message } } callback(results); }});"
    public final String sandboxBusterScript "const callback = arguments[arguments.length - 1];const iframes = Array.from( document.querySelectorAll(\'iframe[sandbox]\'));const removeSandboxAttr = clone => attr => { if (attr.name === \'sandbox\') return; clone.setAttribute(attr.name, attr.value);};const replaceSandboxedIframe = iframe => { const clone = document.createElement(\'iframe\'); const promise = new Promise( iframeLoaded => (clone.onload = iframeLoaded) ); Array.from(iframe.attributes).forEach(removeSandboxAttr(clone)); iframe.parentElement.replaceChild(clone, iframe); return promise;};Promise.all(iframes.map(replaceSandboxedIframe)).then(callback);"