Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the Document</title> </head> <body> <iframe id="iframe" src="/" ></iframe> <script> let oldDocs = iframe.contentDocument; iframe.onload = function() { let newDocs = iframe.contentDocument; // the loaded document is different from the original alert(oldDocs == newDocs); // false }; </script> </body> </html>