back2dos / js-virtual-dom Goto Github PK
View Code? Open in Web Editor NEWWrapper for MattEsch's virtual-dom
License: The Unlicense
Wrapper for MattEsch's virtual-dom
License: The Unlicense
js-virtual-dom still tries to use GeneratorOptions but according to changes in hxx it's not available anymore.
Title says it all.
virtual dom is a library that can work also inside domless enviroment (the diff function can work inside a webworker and stream his output to the main thread where is apply the patch function).
But in haxe the extern VDom is mapped with window.virtualDom (https://github.com/back2dos/js-virtual-dom/blob/master/src/vdom/VDom.hx#L9).
with a compile time flag this problem can be resolved
Trying to compiler tests.
I am getting Type not found: Generator
I can't write <span tabIndex="0">
, instead I should use <span tabIndex={0}>
. It would be nicer if Int attributes in quotes would be allowed.
https://www.w3.org/wiki/PF/XTech/HTML5/RoleAttribute
The usecase of it is pretty common and I see no point of not supporting it.
I've tried to define svg
and path
tags with their attributes, and it removes every custom attribute of path that I defined:
static function svg(?attr:SvgAttr, ?children:Children):VNode return h('svg', attr, children);
static function path(?attr:PathAttr, ?children:Children):VNode return h('path', attr, children);
//...
typedef CheckboxAttr = {>Attr,
@:optional var label(default,never):String;
@:optional var disabled(default,never):Bool;
@:optional var checked(default,never):Bool;
@:optional var indeterminate(default,never):Bool;
@:optional var value(default,never):String;
}
typedef SvgAttr = {>Attr,
@:optional var xmlns:String;
@:optional var externalResourcesRequired:Bool;
@:optional var version:Float;
@:optional var baseProfile:SvgBaseProfile;
@:optional var width:Float;
@:optional var height:Float;
@:optional var preserveAspectRatio:String;
@:optional var contentScriptType:String;
@:optional var contentStyleType:String;
@:optional var viewBox:String;
}
@:enum abstract SvgBaseProfile(String)
{
var None = "none";
var Full = "full";
var Basic = "basic";
var Tiny = "tiny";
}
hxx defined template:
<svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path"
fill="none"
stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
</svg>
Rendered result:
<svg class="mdc-checkbox__checkmark">
<path class="mdc-checkbox__checkmark__path"></path>
</svg>
Expected behavior:
I should see viewBox, fill, storke and d attributes in the rendered result
Hi,
i am testing hxx with with virtual dom.
with this code
var x = vdom.VDom.hxx('
<div>
<div class="foo">2</div>
</div>
');
trace(x);
i get src/Main.hx:8: characters 11-14 : Unknown identifier : div
you can find the code example here https://github.com/francescoagati/js-virtual-dom/blob/master/src/Main.hx
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.