Comments (7)
the click listener is executed everytime i click on the button (the label is correctly updated)
from doom.
it works correctly if i set it to a different listener, maybe that's the reason why this error wasn't revealed.
from doom.
That's right, the patching mechanism will not remove attributes or events that are not explicitly indicated. You can pass to the left case "click" => null
(or an empty handler) and it should work.
from doom.
hmm, is there any reason why you don't remove them? Don't you compare the vdom and generate remove patches? I'm not sure, but i can imagine that this behaviour leads to nasty bugs.
from doom.
The reason is that the real doms has quite literally hundreds of attributes and properties and the VDOM knows about the things that exist but not the things that were existing in the last update. So to be clear I do not compare the old VDOM with the new one. I compare the VDOM with the actual DOM. I tried VDOM to VDOM before and the surprises were even worse. The hidden requirement is that if you have symmetrical elements with the same name they should also bring the same collection of attributes. I wish there was a more formal way to enforce that.
from doom.
what kind of issues did you run in when comparing VDOM with VDOM?
from doom.
The main problem was with components that changed their own attributes and HTML internally (bootstrap components and so on). In that case the old VDOM didn't look at all like the current DOM. There might be a sweet spot where patches to VDOM and patches to DOM can live in harmony.
from doom.
Related Issues (12)
- Make the selector parser function a macro HOT 1
- PatchChild index is wrong when the DOM is modified externally HOT 3
- Not automatically converting an array of VNode to VChildren HOT 2
- Render.hx associate multiple components to a single DOM node? HOT 2
- Typo in repo description HOT 1
- the demos on the front page link to nowhere HOT 4
- Test cases broken since yesterday's commit HOT 2
- Leak in migrate
- Idea: support a selector-like syntax for creating elements with id, class, attributes, etc. HOT 4
- AutoComponent idea HOT 9
- Possible way to embed styles for Components HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from doom.