[Bug 12715] When used to include data blocks (as opposed to scripts), the data must be embedded inline

https://www.w3.org/Bugs/Public/show_bug.cgi?id=12715

--- Comment #13 from piersh@hotmail.com 2012-01-13 06:03:42 UTC ---
> The proposal in comment 3 doesn't say how the script would get to the data.

the <script> block is a node in the DOM and it's content can be accessed using
the DOM API - as was shown in comment #3. The spec, however only allows the use
of inline script blocks. All I'm suggesting is that this seemingly arbitrary
restriction be lifted, or at the very least justified.

> I
> don't see why it would end up being any less code than using XHR.

Again, please see comment #3. Maybe you missed it because it's so simple.
That's the point, somewhat.

This is the entirety of HTML code required to load an external shader
definition and call the 'compileShader' function when the load has completed.
The 'defer' or 'async' attributes could be used here to control timing.

I'm not going to attempt to post the XHR code. I'd probably get it wrong
without any means to verify its correctness.

> I also don't see any advantage to this being declarative rather than
> imperative, since we're talking about ways to get data to a script.

This isn't about getting data to a script. It's about executing script on data.

Why is declarative better than imperative? I dunno, ask Tim. This is htMl after
all...

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Friday, 13 January 2012 06:05:48 UTC