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 17087 - pushState()'s third argument being null (and maybe undefined) needs to be ignored as it breaks YUI. I suggest making it nullable and ignoring null in prose, that should be sufficient. (Gecko treats null as the empty string here, stringifies undefined at t
Summary: pushState()'s third argument being null (and maybe undefined) needs to be ign...
Status: RESOLVED FIXED
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: 2012-05-17 11:38 UTC by contributor
Modified: 2013-03-22 18:17 UTC (History)
4 users (show)

See Also:


Attachments

Description contributor 2012-05-17 11:38:20 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html
Multipage: http://www.whatwg.org/C#history-0
Complete: http://www.whatwg.org/c#history-0

Comment:
pushState()'s third argument being null (and maybe undefined) needs to be
ignored as it breaks YUI. I suggest making it nullable and ignoring null in
prose, that should be sufficient. (Gecko treats null as the empty string here,
stringifies undefined at the moment; WebKit treats null/undefined as missing
argument; Opera breaks YUI :-(.)

Posted from: 82.161.179.17 by annevk@opera.com
User agent: Opera/9.80 (Macintosh; Intel Mac OS X 10.7.4; U; en) Presto/2.10.229 Version/11.64
Comment 1 Anne 2012-05-17 11:43:19 UTC
Search for pushState in http://yuilibrary.com/yui/docs/api/files/history_js_history-html5.js.html by the way to see the "mistake".
Comment 2 Simon Pieters 2012-05-21 14:03:06 UTC
Also give replaceState the same treatment.
Comment 3 Ian 'Hixie' Hickson 2012-06-29 01:34:00 UTC
Isn't there some WebIDL magic I can use for this?
Comment 4 Cameron McCormack 2012-06-29 01:50:58 UTC
Is the behaviour of pushState when passing "" as the url different from leaving it off?  If not, then you can just use [TreatNullAs=EmptyString].  If it is, and you need null to behave like omitting the argument, you'll need to do as Anne suggested.  I *could* introduce a [TreatNullAs=Missing], just like the [TreatUndefinedAs=Missing] that exists now, but it seems simpler just to handle this in prose.
Comment 5 contributor 2012-07-18 17:54:45 UTC
This bug was cloned to create bug 18271 as part of operation convergence.
Comment 6 Ian 'Hixie' Hickson 2012-09-11 23:59:13 UTC
This will need some testing.
Comment 7 Ian 'Hixie' Hickson 2012-11-20 08:12:51 UTC
Also consider:
https://github.com/w3c/html/commit/cd7313f8b21c8069488c1efec603769745585990
Comment 8 contributor 2013-02-01 00:19:00 UTC
Checked in as WHATWG revision r7685.
Check-in comment: Make the third argument of pushState and replaceState accept null.
http://html5.org/tools/web-apps-tracker?from=7684&to=7685
Comment 9 Anne 2013-02-01 09:28:44 UTC
Reopening as bz will ask you to make it default to null in IDL.
Comment 10 Ian 'Hixie' Hickson 2013-03-22 18:16:20 UTC
That's the definition of a pointless change. But fine. Hopefully I didn't break anything while making it.
Comment 11 contributor 2013-03-22 18:17:13 UTC
Checked in as WHATWG revision r7767.
Check-in comment: Move the presence checking into the IDL
http://html5.org/tools/web-apps-tracker?from=7766&to=7767