Hacker News new | past | comments | ask | show | jobs | submit login

Try my new lib... here it is right here!

    document.createElement("div");



Most people get tired of the verbosity of createElement + appendChild + createTextNode, so they whip up a utility function, something like

  element(‘h1’, {class: “foo”}, “Chapter 1”)
Then they add method chaining, support for event listeners, and various other bells and whistles.

And that’s how new Javascript frameworks are born.


I've been using plain JavaScript more and more lately. Luckily Element.protoype has this nice property where if you attempt to read some setter functions it will throw, making it cake to implement a chainable createElement.

Fun stuff, https://github.com/mini-eggs/ogle-tr-122b



What's your library licensed as?


Surely you'd have to pick SSPL, to avoid the risk of Amazon getting rich off this innovative technology without contributing back to the community???




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: