mirror of
https://github.com/servo/servo.git
synced 2025-08-02 12:10:29 +01:00
Auto merge of #10354 - perlun:implement-missing-html-script-element-attributes, r=Ms2ger
HTMLScriptElement: Added missing DOM properties This should sort out most (all?) of the ones pointed out in #10227. /cc @jdm <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10354) <!-- Reviewable:end -->
This commit is contained in:
commit
3b2a1a3c47
5 changed files with 31 additions and 419 deletions
|
@ -600,6 +600,31 @@ impl HTMLScriptElementMethods for HTMLScriptElement {
|
|||
// https://html.spec.whatwg.org/multipage/#dom-script-src
|
||||
make_setter!(SetSrc, "src");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-script-type
|
||||
make_getter!(Type, "type");
|
||||
// https://html.spec.whatwg.org/multipage/#dom-script-type
|
||||
make_setter!(SetType, "type");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-script-charset
|
||||
make_getter!(Charset, "charset");
|
||||
// https://html.spec.whatwg.org/multipage/#dom-script-charset
|
||||
make_setter!(SetCharset, "charset");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-script-defer
|
||||
make_bool_getter!(Defer, "defer");
|
||||
// https://html.spec.whatwg.org/multipage/#dom-script-defer
|
||||
make_bool_setter!(SetDefer, "defer");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-script-event
|
||||
make_getter!(Event, "event");
|
||||
// https://html.spec.whatwg.org/multipage/#dom-script-event
|
||||
make_setter!(SetEvent, "event");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-script-htmlfor
|
||||
make_getter!(HtmlFor, "for");
|
||||
// https://html.spec.whatwg.org/multipage/#dom-script-htmlfor
|
||||
make_setter!(SetHtmlFor, "for");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-script-text
|
||||
fn Text(&self) -> DOMString {
|
||||
Node::collect_text_contents(self.upcast::<Node>().children())
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
// https://html.spec.whatwg.org/multipage/#htmlscriptelement
|
||||
interface HTMLScriptElement : HTMLElement {
|
||||
attribute DOMString src;
|
||||
// attribute DOMString type;
|
||||
// attribute DOMString charset;
|
||||
attribute DOMString type;
|
||||
attribute DOMString charset;
|
||||
// attribute boolean async;
|
||||
// attribute boolean defer;
|
||||
attribute boolean defer;
|
||||
// attribute DOMString crossOrigin;
|
||||
[Pure]
|
||||
[Pure]
|
||||
attribute DOMString text;
|
||||
|
||||
// also has obsolete members
|
||||
|
@ -19,6 +19,6 @@ interface HTMLScriptElement : HTMLElement {
|
|||
|
||||
// https://html.spec.whatwg.org/multipage/#HTMLScriptElement-partial
|
||||
partial interface HTMLScriptElement {
|
||||
// attribute DOMString event;
|
||||
// attribute DOMString htmlFor;
|
||||
attribute DOMString event;
|
||||
attribute DOMString htmlFor;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue