Closed
Bug 532602
Opened 15 years ago
Closed 7 years ago
location.href throws error
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: bugzilla33, Unassigned)
References
()
Details
(Keywords: html5, Whiteboard: [urispec])
Attachments
(1 file)
676 bytes,
text/html
|
Details |
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; FDM) Build Identifier: location.href throws error when use not registered protocol Reproducible: Always Steps to Reproduce: run attachement Actual Results: throws error Expected Results: no error other browsers do not throw errors
Reporter | ||
Updated•15 years ago
|
Component: General → DOM
Product: Firefox → Core
Reporter | ||
Updated•15 years ago
|
Version: unspecified → 1.9.2 Branch
Reporter | ||
Comment 1•15 years ago
|
||
Reporter | ||
Updated•15 years ago
|
Summary: location.href throw error → location.href throws error
Reporter | ||
Comment 3•15 years ago
|
||
Link in raw HTML do not throw errors. <a href="custom://link">custom://link</a> Only JS location.href <span onclick="location.href='custom://link'">custom://link</span>
Updated•15 years ago
|
QA Contact: general → general
Reporter | ||
Updated•15 years ago
|
Comment 4•14 years ago
|
||
There's no way to throw an exception from the <a href>, since that's not in script. You presumably want the browser to silently do nothing instead. It's not clear to me why this would be better than telling the calling script that the load is flatly not possible, but in any case it needs spec work.
Keywords: html5
Comment 5•14 years ago
|
||
The spec [1] requires raising a SYNTAX_ERR if resolving the URL is unsuccessful. However, thanks to the URI people, the resolving algorithm is useless ATM. [1] <http://www.whatwg.org/html/#dom-location-href>
Updated•14 years ago
|
Whiteboard: [urispec]
Comment 6•11 years ago
|
||
So setting href invokes http://url.spec.whatwg.org/#dom-url-href which invokes stuff from http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#location which throws an exception. I guess the question is whether that should be caught or not.
Comment 7•7 years ago
|
||
This is per the standard.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
Assignee | ||
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•