document.url has no setter

RESOLVED INVALID

Status

()

Firefox
General
RESOLVED INVALID
11 years ago
11 years ago

People

(Reporter: James Taylor, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0

you can't asign a value to document.url in order to reload a page
document.url is an alias for window.location.href which still can be asigned to
correctly.
document.url needs a setter creating to assign a value to window.location.href

Reproducible: Always

Steps to Reproduce:
1.create a webpage with a script file in it containing the line document.url="http://www.google.com"
2.launch that webpage in mozilla
3.look at the error console to see the error
Actual Results:  
Error: setting a property that has only a getter
Source File: file:///F:/temp/ibmbanner.html?com.ibm.cics.ts.doc
Line: 12

Expected Results:  
page reloads to new page (script was meant to fix urls containing com.ibm.cics.ts.doc to com.ibm.cics.ts31.doc)
The DOM spec clearly states that document.URL is readonly.

http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109/html.html#ID-46183437
Status: UNCONFIRMED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.