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 20190 - type="text/javascript" attribute specification missing in beginning <script> tag
Summary: type="text/javascript" attribute specification missing in beginning <script> tag
Status: RESOLVED WONTFIX
Alias: None
Product: Testing
Classification: Unclassified
Component: testharness.js (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: James Graham
QA Contact: James Graham
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-30 20:17 UTC by Gérard Talbot
Modified: 2012-12-02 18:02 UTC (History)
1 user (show)

See Also:


Attachments

Description Gérard Talbot 2012-11-30 20:17:31 UTC
Actual results
--------------

line 23 * <script src="/resources/testharness.js"></script>
line 24 * <script src="/resources/testharnessreport.js"></script>



Expected results
----------------

line 23 * <script type="text/javascript" src="/resources/testharness.js"></script>
line 24 * <script type="text/javascript" src="/resources/testharnessreport.js"></script>

Gérard
Comment 1 Philippe Le Hegaret 2012-11-30 20:26:54 UTC
Per HTML5 [1], the default value of the type attribute is text/javascript, so there is no need to specify it...

[1] http://www.w3.org/TR/html5/the-script-element.html#the-script-element
Comment 2 Gérard Talbot 2012-12-02 18:02:47 UTC
> Per HTML5 [1], the default value of the type attribute is text/javascript,
> so there is no need to specify it...
> 
> [1] http://www.w3.org/TR/html5/the-script-element.html#the-script-element

The usage of testharness.js is not restricted to HTML5 (which isn't even finalized PR yet). In fact, the
http://w3c-test.org/resources/testharness.js
is intended for XHTML 1 documents. 

I created this bug report because many script-based tests at 
http://test.csswg.org/suites/
were having validation errors in part simply due to the missing of that attribute.

In general, it's best to avoid issues when creating an how-to-use document for multiple use. If testharness.js is used for HTML4 or HTML5 or XHTML1 documents, then what's the most flexible and valid way to declare scripts?

Gérard