Javascript:alert('...') - Error: uncaught exception: ReferenceError: alert is not defined [duplicate]
Possible Duplicate:
JavaScript alert not working in Firefox 6
I often execute Javascript code in the address bar (mostly for debugging and testing): javascript:alert(some_function_with_interesting_return_val开发者_StackOverflow中文版ue('blah')); Or - more obvious: javascript:alert('interesting value');
This doesn't seem to work anymore with Firefox 6: Error: uncaught exception: ReferenceError: alert is not defined
How is it possible for alert() not to be defined ?
I've double-checked it with Firefox 5, Epiphany, Midori and Chromium - works fine.
I think it's maybe prevention, because a lot of sites abused this.
FYI, I'm probably going to split this bug into multiple, short and longer term fixes.
Short term: disallow pasting of javascript: URLs into the URL bar Longer term: additionally require that bookmarklets be "whitelisted" in the Bookmark Manager before it can run JavaScript
https://bugzilla.mozilla.org/show_bug.cgi?id=527530#c6
精彩评论