Closed
Bug 376809
Opened 18 years ago
Closed 17 years ago
Relative URLs (e.g. to stylesheet) don't work for documents created with document.write
Categories
(Core :: DOM: HTML Parser, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: duncan.loveday, Assigned: mrbkap)
References
Details
Attachments
(4 files, 1 obsolete file)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1
A document created entirely from javascript, for example by executing
var w=window.open(""); w.document.writeln("<html>....</html");
and which contains relative URLs, for example a stylesheet, will not succeed in loading the reference file. No warnings are output.
Reproducible: Always
Steps to Reproduce:
1. Save the attached stylesheet and html file in a directory.
2. Open the HTML file in Firefox 2.
3.
Actual Results:
The text is displayed in the default style.
Expected Results:
The text should be displayed in font size 32, bold and red as defined by the stylesheet.
Note that this works in the FF3 trunk builds so I guess this bug will just get closed as FIXED. I only raise it to document the situation. The attached test case also contains a workaround (explicitly adding the base path to the relative URL).
I don't know if this ever worked in earlier versions.
Reporter | ||
Comment 1•18 years ago
|
||
Reporter | ||
Comment 2•18 years ago
|
||
Reporter | ||
Comment 3•18 years ago
|
||
Oops - had the workaround uncommented
Attachment #260912 -
Attachment is obsolete: true
Reporter | ||
Comment 4•18 years ago
|
||
FWIW Here's another example - FF2 fails to resolve a relative URL in a hyperlink. Again, works in the FF3 trunk.
Reporter | ||
Comment 5•18 years ago
|
||
Updated•18 years ago
|
Summary: Relative URLs (e.g. to stylesheet) don't work for documents created by javascript → Relative URLs (e.g. to stylesheet) don't work for documents created with document.write
Reporter | ||
Comment 6•17 years ago
|
||
FWIW The current version of Opera has the same issue.
Reporter | ||
Comment 8•17 years ago
|
||
Should this be closed as WFM ?
Can't remember why I raised this now as it works in the trunk builds.
Comment 9•17 years ago
|
||
-> WORKSFORME per comment 8.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → WORKSFORME
Version: unspecified → Trunk
Updated•17 years ago
|
Flags: in-testsuite?
You need to log in
before you can comment on or make changes to this bug.
Description
•