[whatwg] Workers and URL origin check

On Fri, May 29, 2009 at 12:27 PM, Kristof Zelechovski
<giecrilj at stegny.2a.pl> wrote:
> Inserting a SCRIPT element is not equivalent to a server-side include. ?It
> is more like linking to an object file.? In particular, substitution macros
> (e.g. CONST in BASIC) in one script do not apply other scripts (all scripts
> present have already been parsed, and applying them to future scripts would
> be to fragile).

um

data:text/html,<script src="data:text/javascript,function a() {b()
}"</script><script src="data:text/javascript,function b()
{alert('ouch') }"</script>

to the extent that a script can affect any variable that is reachable,
it does apply to all other scripts and certainly if i replace a
primitive object property/method i'm affecting future scripts.

Sure you could argue that the object file example is accurate if you
remind people of ld preloading and symbol shadowing etc., btu most
people wouldn't think about it that way.

Received on Tuesday, 2 June 2009 01:31:30 UTC