purescript-halogen-vdom
purescript-halogen-vdom copied to clipboard
An extensible virtual-dom library for PureScript.
fixes #37 WIP
I, on several occasions use third party libraries that manage HTML themselves (WYSIWYG editors, drag-drop, FontAwesome DOM watcher). I would like to define on the parent element of the elements...
We can just call createElementNs, because namespace can be null according to spec https://dom.spec.whatwg.org/#validate-and-extract And examples https://developer.mozilla.org/en-US/docs/Web/SVG/Namespaces_Crash_Course
here is the code from next.js example  here is how nextjs rendered html  here are relevant react code parts https://github.com/facebook/react/blob/b87aabdfe1b7461e7331abb3601d9e6bb27544bc/packages/react-dom/src/shared/DOMNamespaces.js#L8-L10 https://github.com/facebook/react/blob/3e94bce765d355d74f6a60feb4addb6d196e3482/packages/react-dom/src/__tests__/ReactDOMServerIntegrationElements-test.js#L391 https://github.com/facebook/react/blob/03de849af03996b7477420c97de7741ce1214149/packages/react-dom/src/__tests__/DOMPropertyOperations-test.js#L41 I'll go sleep
just various comments while I was learning a code I think non-ideal comment is better than no comments at all
here https://github.com/purescript-halogen/purescript-halogen-vdom/blob/8b91e55019060f50779dba20959f47cf4b60678d/src/Halogen/VDom/DOM/Prop.purs#L149-L155 well, I kind of understand why, but still want to know the explanation the other question is should we update other propNames this way? for example react calls...
I have mentioned it here https://github.com/purescript-halogen/purescript-halogen/issues/610#issuecomment-614393683 just like for: 1. https://reactjs.org/docs/react-dom.html#hydrate 2. https://github.com/snabbdom/snabbdom/blob/master/src/tovnode.ts The second link is just for reference. It builds VDOM from DOM node, but our `hydrate` method...
Could someone please add documentation about what each constructor is used for? What's the difference between `Attribute` and `Property`? tnx, If I'll find first - I will add https://github.com/slamdata/purescript-halogen-vdom/blob/34c032aa5f72b600d69ab970e2737ca533c6c118/src/Halogen/VDom/DOM/Prop.purs#L34-L38
I need to come up with a small reproduction case for this, but as an example of the error: ``` Uncaught DOMException: Failed to set the 'value' property on 'HTMLInputElement':...