Re:Userinterface.js – A small library to build front-end Jav...
by zeptonix on Monday June 01, 2020 @03:30PM
(#23382681)
I think I'd have about three "UserInterface"'s in me before going crazy over why they didn't just name it "UI"
Re:Userinterface.js – A small library to build front-end Jav...
by thoughtsunifica on Monday June 01, 2020 @05:39PM
(#23384253)
I think you have a great point, how about code snippets or renaming the global object in your index.html or application entry point? Thanks for looking at it, I appreciate.
Input:
UserInterface.model({ name: "children", method: UserInterface.appendChild, properties: { tagName: "div", className: "model", children: [ { tagName: "div", className: "child", textContent: "My first child" // and so on.. } ] } });
UserInterface.runModel("children", { parentNode: document.body });
Output:
<body> <div class="model"> <div class="child">My first child</div> </div> </body>