lexonomy_custom_editor/src/snabbdom.py
2019-11-05 22:18:20 +01:00

17 lines
651 B
Python

__pragma__ ('noanno')
__pragma__ ('js', """
var snabbdom = require('snabbdom.js');
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/props').default, // for setting properties on DOM elements
require('snabbdom/modules/style').default, // handles styling on elements with support for animations
require('snabbdom/modules/eventlisteners').default, // attaches event listeners
]);
var s_h = require('snabbdom/h').default; // helper function for creating vnodes
""", None)
# export the symbols
h = s_h
patch = s_patch