3 ms·
> The underlying bug is that if you through the DOM append a SCRIPT tag loading an external script, Opera's parser will pause until that script has loaded. How
by sesqu 15y ago
> The underlying bug is that if you through the DOM append a SCRIPT tag loading an external script, Opera's parser will pause until that script has loaded.
How is this a browser bug? I expect all script tags to execute when they are parsed, and make sure to trigger DOM-touching scripts only after the DOM reports being ready.
- pornel 15y agoIndeed, it's rather sketchy code asking for a race condition. I guess Opera looks at it from "Hixie" perspective: if 3 out of 4 engines do this and sites rely on it, then that's the standard.
- driverdan 15y ago"Opera's parser will pause until that script has loaded" I read this as working like IE6 loading a standard SCRIPT tag in HTML. When the parser hits it all HTML parsing stops, waits for the script to download, parse, and run, then resumes. While slow it works for inline HTML parsing. Dynamically loaded scripts, such as what Opera is describing, shouldn't cause the HTML parser to pause while the script is downloading and parsing. IMO this is a pretty big bug considering how popular dynamically appending scripts has become (eg Google Analytics async loader).