Closed Bug 685774 Opened 13 years ago Closed 13 years ago

Implement document.scripts

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla9

People

(Reporter: emk, Assigned: emk)

References

()

Details

(Keywords: addon-compat, dev-doc-complete, html5, Whiteboard: [mentor=bz])

Attachments

(1 file, 1 obsolete file)

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
Attached patch patch (obsolete) — Splinter Review
> 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);
Fixed review comments.
Attachment #559490 - Attachment is obsolete: true
Attachment #559499 - Flags: review+
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
Closed: 13 years ago
Resolution: --- → FIXED
Would this bug need the dev-doc-needed keyword marker?
Sure.
Keywords: dev-doc-needed
Whiteboard: [mentor=bz][inbound] → [mentor=bz]
Target Milestone: --- → mozilla9
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: