Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <script type="text/javascript">
- function load()
- {
- var foo = document.getElementById("foo"),
- bar = document.getElementById("bar"),
- baz = document.getElementById("baz");
- baz.contentDocument.write("<!DOCTYPE html><html><head></head><body><div style='height:1000px; background-color:yellow;'></div></body></html>");
- window.addEventListener("DOMMouseScroll", mouseWheel, true);
- window.addEventListener("mousewheel", mouseWheel, true);
- }
- function mouseWheel(anEvent)
- {
- console.log("wheel: "+anEvent);
- }
- </script>
- </head>
- <body onload="load();">
- <div id="foo" style="width:500px; height:300px; background-color:red;">
- <div id="bar" style="width:400px; height:200px; top: 50px; left: 50px; position: absolute; background-color:blue;">
- <iframe id="baz" style="width:100%; height:100%" scrolling="no"></iframe>
- </div>
- </div>
- </body>
- </html>
Add Comment
Please, Sign In to add comment