Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

11
  • \$\begingroup\$ Exceptions will still show in the console. You can handle those by doing window.addEventListener('error',function(){}); \$\endgroup\$ Commented Oct 18, 2015 at 19:19
  • \$\begingroup\$ @IsmaelMiguel Now I can't take all the credit! d;-D \$\endgroup\$
    – wizzwizz4
    Commented Oct 18, 2015 at 19:24
  • 5
    \$\begingroup\$ Does this seriously work? That makes no sense at all: document should still be accessible from the outer scope in the inserted code, and it shouldn't get replaced until after the inserted code has finished executing. \$\endgroup\$ Commented Oct 18, 2015 at 20:46
  • 2
    \$\begingroup\$ It's not easy \$\endgroup\$ Commented Oct 19, 2015 at 21:02
  • 2
    \$\begingroup\$ Ran this in console, then tried to upvote it... \$\endgroup\$
    – emanresu A
    Commented Apr 5, 2021 at 0:48