mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 13:15:09 +00:00
LibWeb: Make sure <script> elements get prepared when connected
There's a bit more nuance to how this should really work, but let's at least make sure we execute <script> elements if you insert them into the document.
This commit is contained in:
parent
d434ae71b3
commit
8cafdf8985
2 changed files with 31 additions and 3 deletions
|
@ -45,10 +45,13 @@ public:
|
|||
void set_parser_document(Badge<HTMLDocumentParser>, DOM::Document&);
|
||||
void set_non_blocking(Badge<HTMLDocumentParser>, bool);
|
||||
void set_already_started(Badge<HTMLDocumentParser>, bool b) { m_already_started = b; }
|
||||
void prepare_script(Badge<HTMLDocumentParser>);
|
||||
void prepare_script(Badge<HTMLDocumentParser>) { prepare_script(); }
|
||||
void execute_script();
|
||||
|
||||
virtual void inserted_into(Node&) override;
|
||||
|
||||
private:
|
||||
void prepare_script();
|
||||
void script_became_ready();
|
||||
void when_the_script_is_ready(Function<void()>);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue