Comments (4)
It would definitely be slower than what you have now, but it would also be more correct, for a variety of scenarios (support all hooks, keyed diff, proper state). The Mithril mocks are probably sufficient for this, and faster than jsdom. I'll give it a try.
The mocks have been re-written for Mithril v1, hopefully they are better suited than the previous version. A possible problem is that they don't implement every element property getter/setter that real DOM nodes do, which means that some values would end up being set as attributes instead of properties...
The result would not be 100% compatible though, because some functions that currently return elements would return DOM nodes instead.
I already worked on this a bit, but m gf drove on my laptop in the mean time (my fault :-/, I had left it leaning on the bumper), and I have to recover the files from the HD (which is intact).
from mithril-query.
Thanks for your comment.
@tombh already tried to use jsdom for this. It turned out not to be as fast and reliable as the current version.
If you want to try this again feel free to do so. I'm sure you could make that happen. I currently don't have the time to do that.
from mithril-query.
I just tried to implement class components. It's tricky and you are right for sure. 100% compatibility with core would be pretty cool.
from mithril-query.
obsolete now as we use domino
from mithril-query.
Related Issues (20)
- consider browser-monkey HOT 1
- Could a browser bundle be published alongside the module? HOT 3
- Can't access DOM of child VNodes HOT 1
- PSA: I've added a bunch of default community health files org-wide HOT 1
- try linkedom
- Closure component support? HOT 3
- Nothing to report HOT 1
- Click events don't fire anymore after npm update
- Custom style properties prevent MQ from rendering components
- Types missing on NPM, need a new version pushed? HOT 1
- Mithril throwing warnings after redraw
- Need to pass children to mq
- consider https://github.com/fgnass/domino HOT 1
- consider puppeteer HOT 1
- Unexpected behaviour for components with leading array
- Missing test for traversing children for sibling HOT 1
- Key events don't allow passing a custom event
- Tests are failing in IE because of non passive change in 2.5.0 version HOT 2
- :contains is not working as expected
- Closure components clarification 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 mithril-query.