Closed Bug 1729239 Opened 3 years ago Closed 3 years ago

Implement HTMLScriptElement.supports(type) method

Categories

(Core :: DOM: Core & HTML, enhancement, P3)

Firefox 91
enhancement

Tracking

()

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: horo, Assigned: evilpie)

References

(Blocks 1 open bug, )

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.20 Safari/537.36

Steps to reproduce:

HTMLScriptElement.supports('classic')

Actual results:

Throws an error:
Uncaught TypeError: HTMLScriptElement.supports is not a function

Expected results:

Returns true.

HTMLScriptElement.supports(type) method was introduced by the recent spec change.
https://html.spec.whatwg.org/multipage/scripting.html#dom-script-supports
https://github.com/whatwg/html/pull/7008

Blocks: html
Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core
Status: UNCONFIRMED → NEW
Ever confirmed: true

Anne, could you set the priority and severity?

Flags: needinfo?(annevk)
Assignee: nobody → evilpies

Thanks Tom for picking this up! \o/

Rationale for priority/severity: this isn't immediately important, but will become more important over time as 1) we implement other features, such as Import Maps, and 2) websites adopt it.

Severity: -- → S4
Flags: needinfo?(annevk)
Priority: -- → P3
Depends on: 1728540
Attachment #9240027 - Attachment description: WIP: Bug 1729239 - Implement HTMLScriptElement.supports(type) method. → Bug 1729239 - Implement HTMLScriptElement.supports(type) method. r?smaug
Pushed by evilpies@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/fed5c082061b
Implement HTMLScriptElement.supports(type) method. r=smaug
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch

FYI MDN docs for this in the FF94 release can be tracked in https://github.com/mdn/content/issues/9365 - mostly this is just a page for the method, browser compatibility update, and a release note.

Feedback welcome on the initial docs, which have been created here: https://github.com/mdn/content/pull/9549
There isn't all that much to say about this yet since it won't become all that useful until you add support for some more script types.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: