1
0
mirror of https://github.com/roytam1/UXP.git synced 2026-07-10 00:58:50 +00:00
Files
UXP/dom/security/test/csp/file_frame_src.js
T
2019-02-15 23:35:05 +08:00

15 lines
361 B
JavaScript

let testframe = document.getElementById("testframe");
testframe.onload = function() {
parent.postMessage({
result: "frame-allowed",
href: document.location.href,
}, "*");
}
testframe.onerror = function() {
parent.postMessage({
result: "frame-blocked",
href: document.location.href,
}, "*");
}
testframe.src = "file_frame_src_inner.html"