LibWeb: Add script element text getter setter

This commit is contained in:
Bastiaan van der Plaat 2023-11-24 17:39:12 +01:00 committed by Andreas Kling
parent 529fd0a65c
commit f3db0003c2
Notes: sideshowbarker 2024-07-16 22:24:48 +09:00
2 changed files with 4 additions and 1 deletions

View File

@ -55,6 +55,9 @@ public:
void unmark_as_already_started(Badge<DOM::Range>);
void unmark_as_parser_inserted(Badge<DOM::Range>);
String text() { return MUST(String::from_deprecated_string(child_text_content())); }
void set_text(String const& text) { string_replace_all(text.to_deprecated_string()); }
private:
HTMLScriptElement(DOM::Document&, DOM::QualifiedName);

View File

@ -13,7 +13,7 @@ interface HTMLScriptElement : HTMLElement {
// FIXME: [CEReactions] attribute boolean async;
[CEReactions, Reflect] attribute boolean defer;
[CEReactions, Reflect=crossorigin, Enumerated=CORSSettingsAttribute] attribute DOMString? crossOrigin;
// FIXME: [CEReactions] attribute DOMString text;
[CEReactions] attribute DOMString text;
[CEReactions, Reflect] attribute DOMString integrity;
[CEReactions, Reflect=referrerpolicy] attribute DOMString referrerPolicy;
// FIXME: [SameObject, PutForwards=value] readonly attribute DOMTokenList blocking;