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

Handle arrays and objects containing non-serializable types (HTMLElement & function) #96

Open
HugoDF opened this issue Dec 2, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@HugoDF
Copy link
Collaborator

HugoDF commented Dec 2, 2020

Follow-up from #78, #80 we've fixed the x-data="{ el: $el }" case. We also detect functions and replace their values with 'function'.

However we get the same error in the following case: x-data="{ els: [$el], elObj: { el: $el, fn: function() {} } }" since we only do a top-level value detection pass.

Update: as part of #101 #102 nested elements/elements in arrays are considered "unserializable", ideally only the key that can't be serialized should be marked as such.

Note: having started a WIP branch, doing this within the current setup might be relatively complicated particularly in flattenData

@HugoDF HugoDF added the bug Something isn't working label Dec 2, 2020
@HugoDF HugoDF changed the title Handle arrays and objects containing HTMLElement's Handle arrays and objects containing HTMLElement's and function Dec 2, 2020
@HugoDF HugoDF changed the title Handle arrays and objects containing HTMLElement's and function Handle arrays and objects containing non-serializable types (HTMLElement & function) Dec 2, 2020
@HugoDF HugoDF added enhancement New feature or request and removed bug Something isn't working labels Dec 3, 2020
@HugoDF
Copy link
Collaborator Author

HugoDF commented Dec 3, 2020

Switching this from a bug to an enhancement since having the above data doesn't crash the app any more due to #102

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant