Boris >That said, I can't reproduce the behavior you claim. >http://jsfiddle.net/59Sxf/ alerts "evil" for me in Chrome. If the alert scripts are referenced as external js files it will alert good.js in Chrome. But I assume it's then a bug in Chrome that Data URLs are treated differently.
Olli > No. It would disable several performance optimizations related to page > loads. Boris >I think it would be terrible if registering a MutationObserver is forced to >disable the preload scan (especially because you never know whether the >MutationObserver will get registered at all until you start running scripts, >at which point your preload scan is already >going along), so I disagree with >this being a great solution. Okay understood, bad idea ;) However, I think the problem remains. I'm fiddling with filtering and "full control" of what is displayed on a user PC since many years (starting with local proxies and then UserJS), still this doesn't seem to be very consistent cross different UAs: - Chrome dropped the event beforeload - Firefox has beforescriptexecute (but only for scripts, of course) Standard supported by all: - unload - counterpart: beforeunload - load - counterpart: ??? This doesn't sound too bad "Safari 5.0 and later (and other WebKit-based browsers) generates a "beforeload" event before loading each subresource belonging to a webpage. The "beforeload" event is generated before loading every script, iframe, image, or style sheet specified in the webpage, for example." from https://developer.apple.com/library/safari/documentation/Tools/Conceptual/SafariExtensionGuide/MessagesandProxies/MessagesandProxies.html#//apple_ref/doc/uid/TP40009977-CH14-SW9 Anyone knows why this never made it into the spec? Or are there alternatives? Sebastian