Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<script type="module">
const kHttpModule =
async function tryImport(url) {
try {
const module = await import(url);
return module.value ?? "loaded";
} catch (e) {
return "blocked";
}
}
(async () => {
const results = {
resourceCrossOrigin: await tryImport(
),
chromeWidget: await tryImport(
"chrome://global/content/elements/moz-message-bar.mjs"
),
httpWithCORS: await tryImport(`${kHttpModule}?allowOrigin`),
httpWithoutCORS: await tryImport(kHttpModule),
};
results.customElementDefined = !!customElements.get("moz-message-bar");
window.moduleLoadResults = JSON.stringify(results);
})();
</script>
</body>
</html>