-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4f7184e
commit 1a59f5e
Showing
3 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
|
||
<div> | ||
|
||
</div> | ||
|
||
<script> | ||
|
||
const onload = () => { | ||
const localFrame = document.createElement('iframe'); | ||
localFrame.src = 'about:blank'; | ||
localFrame.width = 400; | ||
localFrame.height = 400; | ||
document.body.appendChild(localFrame); | ||
|
||
const localFrame1PImgElm = document.createElement('img'); | ||
localFrame.contentDocument.body.appendChild(localFrame1PImgElm); | ||
localFrame1PImgElm.src = './brave-logo-sans-text.svg'; | ||
|
||
const localFrame3PImgElm = document.createElement('img'); | ||
localFrame.contentDocument.body.appendChild(localFrame3PImgElm); | ||
localFrame3PImgElm.src = 'https://brave.com/static-assets/images/brave-logo-sans-text.svg'; | ||
|
||
const localFrameScript = document.createElement('script'); | ||
localFrameScript.src = 'test.js'; | ||
localFrame.contentDocument.body.appendChild(localFrameScript); | ||
|
||
const mainFrame1PImageElm = document.createElement('img'); | ||
document.body.appendChild(mainFrame1PImageElm); | ||
mainFrame1PImageElm.src = './brave-logo-sans-text.svg'; | ||
|
||
const mainFrame3PImageElm = document.createElement('img'); | ||
document.body.appendChild(mainFrame3PImageElm); | ||
mainFrame3PImageElm.src = 'https://brave.com/static-assets/images/brave-logo-sans-text.svg'; | ||
} | ||
|
||
window.onload = onload; | ||
|
||
</script> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
console.log('First Party Local Frame'); | ||
|
||
const text = document.createElement('h1'); | ||
text.textContent = 'First Party Local Script'; | ||
document.body.appendChild(text); | ||
|
||
var xhttp = new XMLHttpRequest(); | ||
xhttp.onreadystatechange = function() { | ||
if (this.readyState == 4 && this.status == 200) { | ||
// Typical action to be performed when the document is ready: | ||
const hp = document.createElement('p'); | ||
hp.textContent = xhttp.responseText; | ||
document.body.appendChild(hp); | ||
} | ||
}; | ||
xhttp.open("GET", "https://blockrequests.localframetesting.xyz/ads/index.txt", true); | ||
xhttp.send(); |