Closed Bug 285585 Opened 20 years ago Closed 20 years ago

syntax error when src attribute of the script tag is left blank

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows XP
defect
Not set
minor

Tracking

()

RESOLVED INVALID

People

(Reporter: jorgen, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.5) Gecko/20041110 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.5) Gecko/20041110 Firefox/1.0

So above URL. When you use a blank src attribute in a script tag a syntax error
will be shown pointing to the first Node. I admit, it is kinda dull to leave the
src attribute blank, but the error should not be shown.

Reproducible: Always

Steps to Reproduce:
1. insert script tag
2. leave src attribute blank
3.

Actual Results:  
Syntax Error pointing to the first node in the document

Expected Results:  
No error at all. A warning at most
An empty src or href points to the file that is currently shown. I think this is
on purpose.
RFC 2396 (http://www.faqs.org/rfcs/rfc2396.html), section 5.2 "Resolving
Relative References to Absolute Form").  Rule #2 is:

  If the path component is empty and the scheme, authority, and
  query components are undefined, then it is a reference to the
  current document and we are done.  Otherwise, the reference URI's
  query and fragment components are defined as found (or not found)
  within the URI reference and not inherited from the base URI.


-> INVALID
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
Component: DOM: HTML → DOM: Core & HTML
QA Contact: ian → general
You need to log in before you can comment on or make changes to this bug.