Skip to content
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

New JS API serializer #1217

Closed
r0x0r opened this issue Sep 12, 2023 · 2 comments
Closed

New JS API serializer #1217

r0x0r opened this issue Sep 12, 2023 · 2 comments

Comments

@r0x0r
Copy link
Owner

r0x0r commented Sep 12, 2023

The old implementation of JS API serializer (plain JSON.stringify) has a number of limitations. Namely inability to serialize DOM events, nodes or circular references. I have implemented a new serializer that overcomes these limitations. This, in turn, makes possible to add a support for DOM events in Python as proposed here #1212

The code for a new serializer is now in master the dom branch and the actual code can be found here

_stringify: function stringify(obj) {

As this is quite a big change, I would appreciate feedback and testing, before it makes to the next release. Comments are welcomed.

@r0x0r
Copy link
Owner Author

r0x0r commented Sep 14, 2023

The new serializer is now used inevaluate_js as well. Changes also moved from master to the dom branch and will be released in the next major version.

@r0x0r
Copy link
Owner Author

r0x0r commented Sep 29, 2023

  • Functions are omitted altogether from serialization (previously replaced with a "function" string)
  • List like objects (ie. NodeList, FileList) are converted to arrays
  • Development moved to the 5.0 branch

@r0x0r r0x0r mentioned this issue Sep 29, 2023
@r0x0r r0x0r closed this as completed Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant