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

dom: should documente more breaking changes since the old version #259

Open
scbizu opened this issue Mar 24, 2020 · 0 comments
Open

dom: should documente more breaking changes since the old version #259

scbizu opened this issue Mar 24, 2020 · 0 comments

Comments

@scbizu
Copy link

scbizu commented Mar 24, 2020

Hi there ! we start to use vecty in our internal projects last year , it was all fine until today we recompile our Go code , it panics after converted into the JavaScript code .

With the the long time debugging, I finally fixed it and I think it should be reported to the vecty community .

Here is the story

Here is our index.html looks like:

<!DOCTYPE html>
<!-- some js resources-->
<html>
   <head>
  </head>
</html>

It works before the RenderInto merged into the master . But now it will occur the panic because of the missing of <body></body> tag . And I think vecty not treat this kind of panic gracefully , the renderIntoNode will accept the nil jsObject if the origin object is js's null (https://github.com/gopherjs/vecty/blob/master/dom_wasmjs_gopherjs.go#L76) , and also the !node.Truthy() can not resolve this kind of null objects and then it panics at https://github.com/gopherjs/vecty/blob/master/dom.go#L1219 .

Everything is OK after I add the body tag to my index.html and put the js resource file at the bottom of my HTML file.

Proposal

  • vecty should treat this panic as the incompatible breaking changes and also doc it .
  • The nil pointer panic should be fixed (or recovered?) since it carries with no useful informations (especially in the console log).
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

No branches or pull requests

1 participant