pakastin / frzr

Turboboosted 2 KB view library for browser & node.js
https://frzr.js.org
ISC License
265 stars 21 forks source link

non-string child throws #22

Closed lhorie closed 8 years ago

lhorie commented 8 years ago
var el = frzr.el("div", {id: "a"}, 1)

expected: <div id="a">1</div> actual: frzr.js:180 Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.

This also happens for booleans and arrays

pakastin commented 8 years ago

Fixed now, thanks for contribution! 👍

pakastin commented 8 years ago

Oh, I will reopen this until I add Array support..

pakastin commented 8 years ago

Now also Array is supported, closing.

pakastin commented 8 years ago

@lhorie btw. check out: https://codepen.io/pakastin/pen/xVWZrZ ;)

pakastin commented 8 years ago

Another version: https://codepen.io/pakastin/pen/aNYZee

There's no position: absolute, everything's positioned with CSS (display: inline-block). You can even resize the window while animating and it will still work like expected.. :P