- From: Ian Hickson <ian@hixie.ch>
- Date: Tue, 28 Aug 2012 17:51:46 +0000 (UTC)
- To: Boris Zbarsky <bzbarsky@MIT.EDU>
- Cc: whatwg@lists.whatwg.org
On Tue, 28 Aug 2012, Boris Zbarsky wrote: > On 8/28/12 1:46 PM, Ian Hickson wrote: > > <script> elements have a ton of state, but for this particular issue, the > > state that is needed is: > > > > - presence or absence of src="" attribute > > - "parser-inserted" flag > > - whether the parser in question was an XML parser or HTML parser > > - parser's script nesting level while "prepare the script" is running > > - whether the parser's Document has a "style sheet that is blocking > > scripts" > > Sure. The state is not a problem; the logic is. > > By the way, does the spec currently block scripts in a page on > stylesheets in subframes? I _think_ Gecko might do that in some cases; > I haven't looked recently... Also not sure what other UAs do. A Document has a style sheet that is blocking scripts if there is either a style sheet that is blocking scripts in the context of that Document, or if that Document is in a browsing context that has a parent browsing context, and the active document of that parent browsing context itself has a style sheet that is blocking scripts. A style sheet in the context of the Document of an HTML parser or XML parser is said to be a style sheet that is blocking scripts if the element was created by that Document's parser, and the element is either a style element or a link element that was an external resource link that contributes to the styling processing model when the element was created by the parser, and the element's style sheet was enabled when the element was created by the parser, and the element's style sheet ready flag is not yet set, and, the last time the event loop reached step 1, the element was in that Document, and the user agent hasn't given up on that particular style sheet yet. A user agent may give up on a style sheet at any time. I beg of you, let's not make it any more complicated. :-) -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 28 August 2012 17:52:19 UTC