Comments (5)
@staltz requirebin has a staleness bug, it loads an old version of mercury that didnt support ev-click
.
Try using jsfiddle (http://jsfiddle.net/LR4Pg/ ) where it does work.
from mercury.
Actually I first noticed this issue when working on my own browserified project, not just in requirebin. It's related to virtual-dom (0.0.19) and virtual-hyperscript (4.4.0) only, since those are the modules I'm depending on. I'm using it like this
h("p.marble-content", {"ev-click": function(){console.log("!");} }, content)
And I can't see !
in the console. I've tried variations, also using value-event
but nothing seems to work. FYI the repo of my project is https://github.com/staltz/rxmarbles , although it doesn't currently have on master branch any example using ev-click
, but might be useful to mention just in case I'm missing something basic.
from mercury.
@staltz https://github.com/Raynos/mercury/blob/master/index.js#L52
You must create a delegator.
The delegator once globally created does the job of delegating global events to the correct ev-click
handler.
from mercury.
Also check out the lifecycle documentation ( https://github.com/Raynos/mercury/blob/master/docs/life-cycles.md#reacting-to-dom-events ).
from mercury.
Oh, ok, I hadn't found that in the docs. Thanks for pointing it out.
from mercury.
Related Issues (20)
- live component reloading HOT 6
- Mercury not exporting virtual-hyperscript SVG HOT 2
- Immutable props
- question: how to detect if a widget has been unmounted HOT 2
- Communication between child components
- Why static render methods? HOT 3
- Using vdom-to-html doesn't work (returns empty string) HOT 6
- Redux + mercury example? HOT 10
- lock down wiki?
- syntax of h HOT 2
- npm install fails HOT 1
- 14.1.0 break all VNode input rendering HOT 8
- newb question HOT 4
- Docs/Introduction: Simple Cycle example missing
- Synchronize tagged version and comment in mercury.js
- Rendering subitems of different types HOT 4
- What is the right way to pass data to click event handlers? HOT 1
- Get the previous version of state var HOT 3
- Splitting components out to their own render loop? HOT 2
- How to attach state to renderer? HOT 10
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 mercury.