Implement document.scripts

RESOLVED FIXED in mozilla9

Status

()

Core
DOM: Core & HTML
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: emk, Assigned: emk)

Tracking

({addon-compat, dev-doc-complete, html5})

Trunk
mozilla9
addon-compat, dev-doc-complete, html5
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [mentor=bz], URL)

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

6 years ago
Firefox is the only browser which lacks a support for document.scripts.
This is pretty simple to implement.  Do you want to take a shot at it?
Whiteboard: [mentor=bz]
Version: unspecified → Trunk
(Assignee)

Comment 2

6 years ago
Created attachment 559490 [details] [diff] [review]
patch

> This is pretty simple to implement.  Do you want to take a shot at it?
Yes, I'll take this bug.
Assignee: nobody → VYV03354
Status: NEW → ASSIGNED
Attachment #559490 - Flags: review?(bzbarsky)
Comment on attachment 559490 [details] [diff] [review]
patch

>+++ b/dom/tests/mochitest/whatwg/test_bug685774_document_scripts.html
>+  is(a.length, c, "unexpected count of scripe elements");

s/scripe/script/

r=me with that typo fixed.  Thank you!
Attachment #559490 - Flags: review?(bzbarsky) → review+
Comment on attachment 559490 [details] [diff] [review]
patch

Review of attachment 559490 [details] [diff] [review]:
-----------------------------------------------------------------

Could you name the test test_document_scripts.html instead (no need for the bug number)?

You could also do a test after calling:
document.createElement("script");
and another after adding this element to the DOM.

::: dom/tests/mochitest/whatwg/test_bug685774_document_scripts.html
@@ +36,5 @@
> +
> +  SimpleTest.finish();
> +}
> +
> +window.addEventListener('load', start, false);

Better to use addLoadEvent(start);
(Assignee)

Comment 5

6 years ago
Created attachment 559499 [details] [diff] [review]
patch for check in

Fixed review comments.
Attachment #559490 - Attachment is obsolete: true
Attachment #559499 - Flags: review+
(Assignee)

Updated

6 years ago
Keywords: checkin-needed
Flags: in-testsuite+
Keywords: checkin-needed
Whiteboard: [mentor=bz] → [mentor=bz][inbound]
http://hg.mozilla.org/mozilla-central/rev/a739df5e7bc0
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED

Comment 7

6 years ago
Would this bug need the dev-doc-needed keyword marker?
(Assignee)

Comment 8

6 years ago
Sure.
Keywords: dev-doc-needed
Whiteboard: [mentor=bz][inbound] → [mentor=bz]
Target Milestone: --- → mozilla9

Updated

6 years ago
Keywords: addon-compat
Documented:

https://developer.mozilla.org/en/DOM/Document.scripts

Updated:

https://developer.mozilla.org/en/DOM/Document
https://developer.mozilla.org/en/DOM/HTMLCollection

And mentioned on Firefox 9 for developers.
Keywords: dev-doc-needed → dev-doc-complete
You need to log in before you can comment on or make changes to this bug.