Skip to content

refactor: Update API usage of sax-wasm #567

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

matz3
Copy link
Member

@matz3 matz3 commented Feb 25, 2025

  • Updating to the new recommended API of sax-wasm
  • Reuse parseXML in xml transpiler

- Updating to the new recommended API of sax-wasm
- Reuse parseXML in xml transpiler
@matz3 matz3 requested a review from a team February 25, 2025 10:14
for await (const [event, detail] of saxParser.parse(webContentStream.getReader())) {
parseHandler(event, detail);
}

await finished(contentStream);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is finished still required? I would expect that the iterator is exhaustive? The sax-wasm README does not call finished in the ReadableStream example...

BTW: toWeb is still experimental in Node 23 (according to their docs)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I guess not but I thought it shouldn't hurt leaving it there. But good point about the experimental API. Then we shouldn't use it, yet.

@matz3 matz3 marked this pull request as draft February 25, 2025 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants