This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 25929 - In the step 8, spec talks about queuing a task for firing pageshow event. However no popular desktop browsers including Chrome(v35), Firefox(v30) and IE(v11) behaves that way.
Summary: In the step 8, spec talks about queuing a task for firing pageshow event. How...
Status: RESOLVED WONTFIX
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-30 21:31 UTC by contributor
Modified: 2014-09-19 23:40 UTC (History)
4 users (show)

See Also:


Attachments
load/pageshow example (4.43 KB, application/x-zip-compressed)
2014-06-02 16:09 UTC, mahesh.kk
Details

Description contributor 2014-05-30 21:31:49 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/
Multipage: http://www.whatwg.org/C#the-end
Complete: http://www.whatwg.org/c#the-end
Referrer: 

Comment:
In the step 8, spec talks about queuing a task for firing pageshow event.
However no popular desktop browsers including Chrome(v35), Firefox(v30) and
IE(v11) behaves that way. 

All desktop browsers when tested thoroughly with multiple iframes, fires
pageshow event along with onload event synchronously. You can find the
screenshots of the same at
https://code.google.com/p/chromium/issues/detail?id=378946. 

Similar behavior is also documented at 7.6.10 History traversal, step #14. I
request to consider updating spec to match browser behavior. 


Posted from: 209.49.249.158
User agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36
Comment 1 Ian 'Hixie' Hickson 2014-05-30 21:50:12 UTC
Can you elaborate on your testing? How do you distinguish between the load and pageload events being fired in the same task vs being fired in separate tasks queued back-to-back on the same task source?
Comment 2 Simon Pieters 2014-06-02 09:22:42 UTC
I didn't file this, but relatedly annevk asked how to distinguish that for XHR the other day:

# [14:55] <zcorpan> annevk: like load() a video in the first event and check the networkState in the second event
# [14:56] <zcorpan> annevk: if it's NETWORK_NO_SOURCE then they were the same task, if it's NETWORK_EMPTY then they were separate tasks
# [14:56] <zcorpan> for a <video> without src or source
http://krijnhoetmer.nl/irc-logs/whatwg/20140520
Comment 3 mahesh.kk 2014-06-02 16:09:06 UTC
Created attachment 1484 [details]
load/pageshow example
Comment 4 mahesh.kk 2014-06-02 16:10:11 UTC
Ian, attached is the testcase I used. Though through HTML output it may not be evident that both load and pageshow events where dispatched within same task or not, however as developer on chrome browser, while I was stepping in the code I could see we indeed fire these events in same thread in chrome (atleast) IFAIK.

 Attached test loads a page with iframe, iframe onpageshow navigates to another page, which onpageshow navigates to on more new page. All events associated to Main frame and 3 subframes triggers load and pageshow synchronously. In chrome, I tried to queue a task for onpageshow and I noticed pageshow was triggered after onload events for main frame and subframes are triggered.
Comment 5 Ian 'Hixie' Hickson 2014-08-05 21:49:07 UTC
That test is far too complicated for me to be able to determine what's going on.

Based on this test:

   http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=3099

...it seems to me that Safari and Chrome are firing new tasks for load and pageshow, but Firefox is using the same task for both. (In the case of Safari, you have to load the test file as a data: URL in its own window; iframes don't seem to get pageshow.)

Anyone have a way to find out what IE does on that test?
Comment 6 Ian 'Hixie' Hickson 2014-09-12 16:43:15 UTC
IE11 gives same task / same task, which means its media handling is quite buggy. So it doesn't contribute here.

That leaves Firefox alone in not following the spec, against two browsers that do, so I guess I should leave the spec as-is.

Unless someone can show that IE is in fact using new tasks for each, I'll mark this WONTFIX. I'm not sure how to test for this in IE and iterating would take me a while given that I don't have IE.