From 85a10c638f126eafa2803debb5c304e44a9c3554 Mon Sep 17 00:00:00 2001 From: Ozbolt Menegatti Date: Mon, 11 Nov 2019 23:02:22 +0100 Subject: [PATCH] WIP: Moving python snabbdom interface and adding some modules --- src/{ => lib}/snabbdom.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) rename src/{ => lib}/snabbdom.py (73%) diff --git a/src/snabbdom.py b/src/lib/snabbdom.py similarity index 73% rename from src/snabbdom.py rename to src/lib/snabbdom.py index aad9ea9..110e20f 100644 --- a/src/snabbdom.py +++ b/src/lib/snabbdom.py @@ -1,11 +1,13 @@ __pragma__ ('noanno') __pragma__ ('js', """ -var snabbdom = require('snabbdom.js'); +var snabbdom = require('snabbdom'); 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/attributes').default, // for setting attributes on Html tags 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 ]); 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 h = s_h -patch = s_patch \ No newline at end of file +patch = s_patch