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 18271 - 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: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-18 17:54 UTC by contributor
Modified: 2013-04-08 22:29 UTC (History)
8 users (show)

See Also:


Attachments

Description contributor 2012-07-18 17:54:42 UTC
This was was cloned from bug 17087 as part of operation convergence.
Originally filed: 2012-05-17 11:38:00 +0000

================================================================================
 #0   contributor@whatwg.org                          2012-05-17 11:38:20 +0000 
--------------------------------------------------------------------------------
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
================================================================================
 #1   Anne                                            2012-05-17 11:43:19 +0000 
--------------------------------------------------------------------------------
Search for pushState in http://yuilibrary.com/yui/docs/api/files/history_js_history-html5.js.html by the way to see the "mistake".
================================================================================
 #2   Simon Pieters                                   2012-05-21 14:03:06 +0000 
--------------------------------------------------------------------------------
Also give replaceState the same treatment.
================================================================================
 #3   Ian 'Hixie' Hickson                             2012-06-29 01:34:00 +0000 
--------------------------------------------------------------------------------
Isn't there some WebIDL magic I can use for this?
================================================================================
 #4   Cameron McCormack                               2012-06-29 01:50:58 +0000 
--------------------------------------------------------------------------------
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 1 Robin Berjon 2012-09-11 14:04:19 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are
satisfied with this response, please change the state of this bug to CLOSED. If
you have additional information and would like the Editor to reconsider, please
reopen this bug. If you would like to escalate the issue to the full HTML
Working Group, please add the TrackerRequest keyword to this bug, and suggest
title and text for the Tracker Issue; or you may create a Tracker Issue
yourself, if you are able to do so. For more details, see this document:

   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: I made |url| nullable for both pS and rS, and ignored null in the prose. I didn't go with Heycam's suggestion because of current entry URL vs entry script URL.
Rationale: It's nicer this way, and it breaks a major library.

https://github.com/w3c/html/commit/cd7313f8b21c8069488c1efec603769745585990
Comment 2 Silvia Pfeiffer 2013-04-08 22:29:42 UTC
FYI: added a further improvement from WHATWG commit:
https://github.com/w3c/html/commit/54524c9626a8493598b4162266a54a6e3cd64ff9