News for hackers. Stuff that matters.
Re:RE:DOM – Tiny DOM library by AgentME on Sunday August 28, 2016 @10:17PM (#12379577)

    el.email = Object.assign(document.createElement('input'),{type:'email'});
Re:RE:DOM – Tiny DOM library by ErikHuisman on Monday August 29, 2016 @01:43AM (#12380218)
el.email = { document.createElement('input'), ...{ type: 'email' }}
Re:RE:DOM – Tiny DOM library by AgentME on Monday August 29, 2016 @11:20PM (#12387273)
I know about the spread operator, but I'm pretty sure that's invalid. `var foo = { document.createElement('input') };` doesn't work, spread or no spread after it.
Re:RE:DOM – Tiny DOM library by ErikHuisman on Tuesday August 30, 2016 @02:17PM (#12392500)
Ow man.. I saw the Object.assign example and thought i don't like it because it requires an extra polyfill. I can just use a spread and let babel handle it.

If anything it should be `var email = {...document.createElement('input'), type: 'email'}`

But that would result in `Object.assign({}, document.createElement('input'), { type: 'email' })`

Got 4 up votes though..

Re:RE:DOM – Tiny DOM library by klibertp on Monday August 29, 2016 @06:33AM (#12381036)
What supports this feature and how is it implemented?
Re:RE:DOM – Tiny DOM library by yawgmoth on Monday August 29, 2016 @06:49AM (#12381089)
Re:RE:DOM – Tiny DOM library by yawgmoth on Monday August 29, 2016 @11:28AM (#12382509)
(Too long to edit my other reply)

Also used was object destructuring: http://odetocode.com/blogs/scott/archive/2014/09/11/features...