Skip to content

Conversation

@sjorsdonkers
Copy link
Contributor

Playwright registers event handlers using Runtime.evaluate in the isolated world before any htmldoc is loaded.
Malloc would fail if netsurf was not initialized. This change initializes the parser on page create which is called when the Page.createTarget. It is ensured that this is called before createIsolatedWorld as createIsolatedWorld requires a main page to be created.
An additional benefit is that it is now symmetric with page removal where the parser is deinited.

image
_addEventListener (for Window)
eventTargetHasListener
strFromData
dom_string_create

@sjorsdonkers sjorsdonkers marked this pull request as draft May 12, 2025 09:27
@sjorsdonkers sjorsdonkers marked this pull request as ready for review May 12, 2025 09:35
@sjorsdonkers sjorsdonkers requested a review from karlseguin May 12, 2025 09:49
@karlseguin karlseguin merged commit 884ec05 into main May 12, 2025
17 checks passed
@karlseguin karlseguin deleted the init_netsurf_at_page_creation branch May 12, 2025 09:58
@github-actions github-actions bot locked and limited conversation to collaborators May 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants