WIP: Moving python snabbdom interface and adding some modules
This commit is contained in:
parent
f83faaa6ce
commit
85a10c638f
|
@ -1,11 +1,13 @@
|
||||||
__pragma__ ('noanno')
|
__pragma__ ('noanno')
|
||||||
__pragma__ ('js', """
|
__pragma__ ('js', """
|
||||||
var snabbdom = require('snabbdom.js');
|
var snabbdom = require('snabbdom');
|
||||||
|
|
||||||
var s_patch = snabbdom.init([ // Init patch function with chosen modules
|
var s_patch = snabbdom.init([ // Init patch function with chosen modules
|
||||||
require('snabbdom/modules/class').default, // makes it easy to toggle classes
|
require('snabbdom/modules/class').default, // makes it easy to toggle classes
|
||||||
require('snabbdom/modules/props').default, // for setting properties on DOM elements
|
require('snabbdom/modules/props').default, // for setting properties on DOM elements
|
||||||
|
require('snabbdom/modules/attributes').default, // for setting attributes on Html tags
|
||||||
require('snabbdom/modules/style').default, // handles styling on elements with support for animations
|
require('snabbdom/modules/style').default, // handles styling on elements with support for animations
|
||||||
|
require('snabbdom/modules/dataset').default, // adding dataset attributes
|
||||||
require('snabbdom/modules/eventlisteners').default, // attaches event listeners
|
require('snabbdom/modules/eventlisteners').default, // attaches event listeners
|
||||||
]);
|
]);
|
||||||
var s_h = require('snabbdom/h').default; // helper function for creating vnodes
|
var s_h = require('snabbdom/h').default; // helper function for creating vnodes
|
||||||
|
@ -14,4 +16,4 @@ var s_h = require('snabbdom/h').default; // helper function for creating vnodes
|
||||||
# export the symbols
|
# export the symbols
|
||||||
|
|
||||||
h = s_h
|
h = s_h
|
||||||
patch = s_patch
|
patch = s_patch
|
Loading…
Reference in New Issue
Block a user