mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 04:52:06 +02:00
LibWeb: Implement <script src> support for synchronous scripts
Scripts loaded in this way will block the parser until they finish executing. This means that they see the DOM before the whole document has been fully parsed. This is all normal, of course. To make this work, I changed the way we notify DOM nodes about tree insertion. The inserted_into() callbacks are now incrementally invoked during parse, as each node is appended to its parent. To accomodate inline scripts and inline style sheets, we now also have a children_changed() callback which is invoked on any parent when it has children added/removed.
This commit is contained in:
Notes:
sideshowbarker
2024-07-19 07:58:05 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/56ca91b9f8c
@@ -36,6 +36,7 @@ public:
|
||||
virtual ~HTMLScriptElement() override;
|
||||
|
||||
virtual void inserted_into(Node&) override;
|
||||
virtual void children_changed() override;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user