HTML DOM createElement() Method - W3Schools
Definition and Usage. The createElement() method creates an Element Node with the specified name. Tip: Use the createTextNode() method to create a text node. Tip: After the element is created, use the element.appendChild() or element.insertBefore() method to insert it to the document.
Document.createElement() | MDN
In an HTML document, the document.createElement() method creates the HTML element specified by tagName, or an HTMLUnknownElement if tagName isn't recognized.
Render Functions & JSX — Vue.js
What is createElement actually returning? It’s not exactly a real DOM element. It could perhaps more accurately be named createNodeDescription, as it contains information describing to Vue what kind of node it should render on the page, including descriptions of any child nodes.We call this node description a “virtual node”, usually abbreviated to VNode.
Thanks, galam. I guess I should have been more clear. I did expect this to be asynchronous in the end. I just want a way to access it that made logical sense to the programmer.
Document (Java Platform SE 7 ) - Oracle
The Document interface represents the entire HTML or XML document. Conceptually, it is the root of the document tree, and provides the primary access to the document's data. Since elements, text nodes, comments, processing instructions, etc. cannot exist outside the context of a Document, the Document interface also contains the factory methods needed to create these objects.
I suggest you use some more meaningful variable names and don't use the same name for different elements. It looks like you are using obj for different elements (overwriting the value in the function) and this can be confusing.
Using document.createElement() to test for browser support ...
Using document.createElement() to test for browser support for an element. Created: July 12th, 10' Cross browser scripting is becoming an ever more convoluted game of features versus support.
HTML DOM appendChild() Method
Definition and Usage. The appendChild() method appends a node as the last child of a node. Tip: If you want to create a new paragraph, with text, remember to create the text as a Text node which you append to the paragraph, then append the paragraph to the document. You can also use this method to move an element from one element to another (See "More Examples").
React Top-Level API
React.memo is a higher order component.It’s similar to React.PureComponent but for function components instead of classes.. If your function component renders the same result given the same props, you can wrap it in a call to React.memo for a performance boost in some cases by memoizing the result. This means that React will skip rendering the component, and reuse the last rendered result.
Introducing JSX – React
React.createElement() performs a few checks to help you write bug-free code but essentially it creates an object like this: