Comments (2)
When using Marko Widgets to build UI components you are using Marko Widgets to facilitate binding behavior to rendered DOM elements. Marko Widgets will invoke your initializer at the appropriate time and you are free to attach your own behavior however you want. This may include using jQuery plugins or calling code in another JavaScript module as shown below:
var fancyEffect = require('./fancy-effect');
module.exports = require('marko-widgets').defineComponent({
// ...
init: function() {
var el = this.el;
$(el).effect1().effect2();
fancyEffect.enable(el);
}
});
Does that answer your question?
from marko-widgets.
Hi @SunnyGurnani, have you had a chance to review my previous comment? Please let me know if that answers your questions. Thanks.
from marko-widgets.
Related Issues (20)
- Proposal: Marko Widgets with ES6 and inline Marko templates HOT 6
- Bubbling event listeners are attached too late HOT 1
- Listeners for event delegation do not work if `document.body` is not available HOT 1
- w- prefix HOT 1
- Add support for csp nonce HOT 1
- Add support for delaying widget destruction from an onBeforeDestroy handler HOT 2
- Macro tag doesn't play well with w-bind / widget
- Bug: w-onchange adds "|w0" for null input HOT 1
- No error message when `w-bind` is used and no `index.js` or `widget.js` is found
- Out parameter?
- w-for attribute not being removed HOT 1
- event-delegation.js:44 Uncaught TypeError: Cannot read property '__widget' of null HOT 1
- Proposal: Template as entry point for UI components HOT 6
- Getting the nested widget instance
- Declarative DOM event listeners broken for non-bubbling events on repeated elements HOT 1
- Make state property full reactively HOT 3
- Missing something with lasso and marko-widgets
- Calling A component in for loop . only trigering first element HOT 3
- Extra event handlers are getting added when noConflict js containing marko widgets is loaded
- Special unicode chars (\u2028 and \u2029) need to be escaped if within script tag
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 marko-widgets.