Skip to content

Conversation

@gonfunko
Copy link
Contributor

The basics

The details

Resolves

Fixes #9253

Proposed Changes

This PR removes dependencies on XML from the events system. This allows for headless use of Blockly in environments without DOM support, e.g. server-side NodeJS. The original issue only identified BlockCreate as being problematic, but BlockDelete, CommentCreate and CommentDelete have the same issue and have also been addressed.

Breaking Change Details

This change is breaking for systems that depend on monitoring the XML-related fields in these events. Generally, the best migration path is to update code to use the equivalent JSON-serialized form stored in the events instead. Alternatively, you can subclass these events, add the XML-related fields in your subclass, and register your event subclasses with the Blockly registry, overriding the default implementations.

@gonfunko gonfunko requested a review from a team as a code owner December 19, 2025 23:10
@gonfunko gonfunko requested review from BenHenning and removed request for a team December 19, 2025 23:10
@github-actions github-actions bot added breaking change Used to mark a PR or issue that changes our public APIs. PR: fix Fixes a bug labels Dec 19, 2025
@rachel-fenichel
Copy link
Collaborator

Does this mean we can get rid of our jsdom dependency?

@gonfunko
Copy link
Contributor Author

I think it would still be necessary if you were intentionally using XML serialization (and probably in other situations too), but #8775 is tracking making it a peer dependency at least.

@gonfunko gonfunko merged commit ba329e4 into v13 Dec 22, 2025
12 of 13 checks passed
@gonfunko gonfunko deleted the unxml branch December 22, 2025 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Used to mark a PR or issue that changes our public APIs. PR: fix Fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants