c-smile / sciter-sdk

Sciter is an embeddable HTML/CSS/scripting engine
http://sciter.com
Other
2.11k stars 223 forks source link

[Bug] tuple-template is broken in version 4.4.2.5 #157

Closed MaherFa closed 4 years ago

MaherFa commented 4 years ago

Minimal code to reproduce: $(body).append ([div: { class:"myclass" },[p: "mytext" ]]);

the mentioned code will cause the app to crash silently, without displaying any errors.

c-smile commented 4 years ago

I'll fix it so it will not crash, but your construction is not a vnode anyway .

It is better to use SSX instead of that cryptic microformat :

$(body).append( <div.myclass><p>mytext</p></div> ); 

Or if mytext is a variable:

var mytext = "Hello world!";
$(body).append( <div.myclass><p>{mytext}</p></div> ); 

SSX makes intentions clearer I think.

MaherFa commented 4 years ago

SSX makes intentions clearer I think.

I Agree.