comment on a part of the script execution spec, regarding not fully active documents

Hi,
there is a part of the spec which says:

"If the script's global object is a Window object whose Document object is  
not fully active, then abort these steps without doing anything. The  
callback is not run."

This is not quite what implementations do, if my interpretation of the  
spec is correct and I am to believe TC  
http://testsuites.opera.com/script-execution/083.html. (TC, in brief:  
IFRAME script adds event listener on parent document. Script in parent  
fires event, navigates IFRAME and fires event again, sets a timeout that  
fires event a third time.)

Implementations differ:
Firefox: fires two events (the second is fired during navigation to  
about:blank?)

Chrome: merrily fires three events, the third one apparently after  
navigating to about:blank

Opera: fires three events, one event successfully, but once navigation  
starts "top" is set to null so two exceptions happen.

Test does not work in IE8, I don't have IE9 handy.

By the spec text, I would expect the second event and third to be a no-op.

TC 084 in same directory confirms that the spec text is OK for the case  
where the IFRAME is removed from the document entirely.

IMO the spec text as-is is probably fine, but is WebKit happy to align  
with the spec?

Another issue I noticed is in the text under the heading "the javascript:  
URL scheme" - specifically the last "otherwise" part of the text. This is  
about trying to navigate a window from a different origin to a javascript:  
URL. Don't we expect a security exception here? Spec just says "let result  
be void". Opera throws an exception the setting script can observe, not  
sure what others do.

-- 
Hallvord R. M. Steen, Core Tester, Opera Software
http://www.opera.com http://my.opera.com/hallvors/

Received on Tuesday, 21 June 2011 09:21:34 UTC