Last active
October 9, 2015 15:39
-
-
Save ThomasGreiner/43baf081642d4b906d2a to your computer and use it in GitHub Desktop.
Adblock Plus issues #3185 and #3186
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Element Hiding: Anonymous iFrame</title> | |
</head> | |
<body> | |
<p> | |
Top frame: [<span class="hide">This text should be hidden</span>] | |
</p> | |
<p> | |
Subframe (Element.appendChild): [<iframe id="append"></iframe>] | |
</p> | |
<p> | |
Subframe (document.write): [<iframe id="write"></iframe>] | |
</p> | |
<script> | |
setTimeout(function() | |
{ | |
var iframe = document.getElementById("append"); | |
var span = document.createElement("span"); | |
span.className = "hide"; | |
span.textContent = "This text should be hidden"; | |
iframe.contentDocument.body.appendChild(span); | |
var doc = document.getElementById("write").contentDocument; | |
doc.open(); | |
doc.write("<span class='hide'>This text should be hidden</span>"); | |
doc.close(); | |
}, 0); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment