Re: [beacon] Random comments

On 1/9/14 6:48 AM, Anne van Kesteren wrote:
> On Thu, Jan 9, 2014 at 7:50 AM, Simon Pieters <simonp@opera.com> wrote:
>> But I'm not sure which is better. Anne, Hixie?
>
> HTML seems to use a mix of entry settings object and incumbent
> settings object, depending on whether it is about resolving URLs or
> origin checks.

HTML actually uses incumbent settings objects in most cases, I believe; 
the entry settings cases are the ones imposed by compat constraints.

> I'm not entirely sure when that difference is
> observable.

Say you have a web page like so:

   <iframe src="foo.html"></iframe>
   <script>
     onload = function() {
       frames[0].f();
     }
   </script>

and foo.html has:

   <script>
     function f() {
       // do something
     }
   </script>

then "do something" has the main web page as the entry settings object 
but foo.html as the incumbent settings object.  So if "f" did a location 
set, for example, the base URI for that string would be the main web 
page (because Location uses the entry settings object for the base URI), 
which is a bizarre non-local effect that I don't think we should be 
duplicating for other APIs...

-Boris

Received on Thursday, 9 January 2014 16:03:36 UTC