WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
229929
Implement HTMLScriptElement.supports(type) method
https://bugs.webkit.org/show_bug.cgi?id=229929
Summary
Implement HTMLScriptElement.supports(type) method
Tsuyoshi Horo
Reported
2021-09-05 19:25:49 PDT
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
Attachments
Patch
(10.94 KB, patch)
2022-01-13 12:00 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(17.40 KB, patch)
2022-01-13 13:57 PST
,
Chris Dumez
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Kevin Neal
Comment 1
2021-09-09 10:56:46 PDT
Thank you for filing. The appropriate engineers have been copied.
Radar WebKit Bug Importer
Comment 2
2021-09-09 10:57:11 PDT
<
rdar://problem/82933899
>
Chris Dumez
Comment 3
2022-01-13 12:00:51 PST
Created
attachment 449090
[details]
Patch
Geoffrey Garen
Comment 4
2022-01-13 13:04:56 PST
Comment on
attachment 449090
[details]
Patch r=me
Darin Adler
Comment 5
2022-01-13 13:16:44 PST
Comment on
attachment 449090
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=449090&action=review
> Source/WebCore/html/HTMLScriptElement.cpp:209 > +bool HTMLScriptElement::supports(const String& type) > +{ > + return type == "classic" || type == "module"; > }
I would make two changes: 1) Take StringView; good practice any time we don’t need to take ownership of the String or take advantage of the hash value stored in the string 2) Put this inline in the header; why not for something this simple that could be inlined into the bindings code?
Chris Dumez
Comment 6
2022-01-13 13:57:28 PST
Created
attachment 449102
[details]
Patch
Chris Dumez
Comment 7
2022-01-13 13:57:51 PST
(In reply to Darin Adler from
comment #5
)
> Comment on
attachment 449090
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=449090&action=review
> > > Source/WebCore/html/HTMLScriptElement.cpp:209 > > +bool HTMLScriptElement::supports(const String& type) > > +{ > > + return type == "classic" || type == "module"; > > } > > I would make two changes: > > 1) Take StringView; good practice any time we don’t need to take ownership > of the String or take advantage of the hash value stored in the string > > 2) Put this inline in the header; why not for something this simple that > could be inlined into the bindings code?
Done, thanks.
EWS
Comment 8
2022-01-13 15:16:50 PST
ChangeLog entry in LayoutTests/ChangeLog contains OOPS!.
Chris Dumez
Comment 9
2022-01-13 15:19:52 PST
Committed
r287996
(
246023@trunk
): <
https://commits.webkit.org/246023@trunk
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug