Re: [whatwg] readyState transitions when aborting a document

2012-06-13 Thread Ian Hickson
On Fri, 20 Apr 2012, Henri Sivonen wrote:
  
  * Should window.stop() really not abort the parser like the spec
  seems to suggest?

 Looks like Opera is alone with the non-aborting behavior. The spec is 
 wrong.

Can you elaborate on this? How can you tell?


  * Should reaching interactive always involve firing DOMContentLoaded?
 
 Probably.

Why?

-- 
Ian Hickson   U+1047E)\._.,--,'``.fL
http://ln.hixie.ch/   U+263A/,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Re: [whatwg] readyState transitions when aborting a document

2012-04-20 Thread Henri Sivonen
On Thu, Apr 19, 2012 at 2:43 PM, Henri Sivonen hsivo...@iki.fi wrote:
  * Is there a way to abort a document load in IE without causing
 immediate navigation away from the document? IE doesn't support
 window.stop().

Yes. document.execCommand(Stop)

  * Does Web compatibility ever require a transition from loading to
 complete without an intermediate interactive state?  (Both chrome
 and Firefox as shipped make such transitions, but those might be
 bugs.)

I have no evidence to say anything sure here, but I doubt Web compat
requires transitions from loading to complete. What actually
happens varies a lot.

  * Should the aborted documents stay in the loading state forever
 like the spec says or should they reach the complete state
 eventually when the event loop spins?

Gecko and WebKit disagree.

  * Should window.stop() really not abort the parser like the spec
 seems to suggest?

Looks like Opera is alone with the non-aborting behavior. The spec is wrong.

  * Should reaching complete always involve firing load?

Not in WebKit.

  * Should reaching interactive always involve firing DOMContentLoaded?

Probably.

  * Does anyone have test cases for this stuff?

Demos: http://hsivonen.iki.fi/test/moz/readystate/

-- 
Henri Sivonen
hsivo...@iki.fi
http://hsivonen.iki.fi/


[whatwg] readyState transitions when aborting a document

2012-04-19 Thread Henri Sivonen
I've been trying to make document.readyState transitions less broken
in Gecko. (The transitions are very sad as of Firefox 13 in pretty
much all but the most trivial cases.)

I'm having a particularly hard time figuring out what the right thing
to do is when it comes to aborting document loads. Unfortunately, I
don't trust the spec to describe the Web-compatible truth.
 * Is there a way to abort a document load in IE without causing
immediate navigation away from the document? IE doesn't support
window.stop().
 * Does Web compatibility ever require a transition from loading to
complete without an intermediate interactive state?  (Both chrome
and Firefox as shipped make such transitions, but those might be
bugs.)
 * Should the aborted documents stay in the loading state forever
like the spec says or should they reach the complete state
eventually when the event loop spins?
 * Should window.stop() really not abort the parser like the spec
seems to suggest?
 * Should reaching complete always involve firing load?
 * Should reaching interactive always involve firing DOMContentLoaded?
 * Does anyone have test cases for this stuff?

-- 
Henri Sivonen
hsivo...@iki.fi
http://hsivonen.iki.fi/