diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-03-05 15:54:53 +0100 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-03-05 15:54:53 +0100 |
commit | 96efcc335bbd9f2ad098e694d6cff6c1c22b4ce8 (patch) | |
tree | cf8120ca6658c04c62e63dc66a8a5b39dbec4c2d /test/haketilo_test/data/pages/scripts_to_block_1.html | |
parent | 709238294ea83525e62476ce59d734c57c11fd3f (diff) | |
download | browser-extension-96efcc335bbd9f2ad098e694d6cff6c1c22b4ce8.tar.gz browser-extension-96efcc335bbd9f2ad098e694d6cff6c1c22b4ce8.zip |
improve script blocking in non-HTML documents (XML)
Diffstat (limited to 'test/haketilo_test/data/pages/scripts_to_block_1.html')
-rw-r--r-- | test/haketilo_test/data/pages/scripts_to_block_1.html | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/test/haketilo_test/data/pages/scripts_to_block_1.html b/test/haketilo_test/data/pages/scripts_to_block_1.html index e7793ee..67bff5e 100644 --- a/test/haketilo_test/data/pages/scripts_to_block_1.html +++ b/test/haketilo_test/data/pages/scripts_to_block_1.html @@ -29,18 +29,25 @@ </script> </head> <body> - <button id="clickme1" - onclick="window.__run = [...(window.__run || []), 'on'];" - blocked-onclick="some useful data"> - Click Meee! - </button> - <a id="clickme2" - href="javascript:window.__run = [...(window.__run || []), 'href'];void(0);"> - Click Meee! - </a> - <iframe src="javascript:void(window.parent.__run = [...(window.parent.__run || []), 'src']);"> - </iframe> - <object data="javascript:window.__run = [...(window.__run || []), 'data'];"> - </object> + <!-- + Put all objects under a <div> to make sure the Mutation Observer does + indeed correctly report changes in subtrees (there are problems with + this in XML documents). + --> + <div> + <button id="clickme1" + onclick="window.__run = [...(window.__run || []), 'on'];" + blocked-onclick="some useful data"> + Click Meee! + </button> + <a id="clickme2" + href="javascript:window.__run = [...(window.__run || []), 'href'];void(0);"> + Click Meee! + </a> + <iframe src="javascript:void(window.parent.__run = [...(window.parent.__run || []), 'src']);"> + </iframe> + <object data="javascript:window.__run = [...(window.__run || []), 'data'];"> + </object> + </div> </body> </html> |