| 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).then(res => JSON.parse(JSON.stringify(res))).then(callback)" |
public final String |
hasRunPartialScript |
"return typeof window.axe.runPartial === \'function\'" |
public final String |
iframeAllowScriptTemplate |
"axe.configure({ allowedOrigins: [\'%s\'] })" |
public final String |
sameOrigin |
"<same_origin>" |
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);" |
public final String |
unsafeAllOrigins |
"<unsafe_all_origins>" |
Copyright © 2023. All rights reserved.