DOM
A task appears after I click Add, but it is not in the source HTML. Help me confirm what was inserted at runtime.
A task appears after I click Add, but it is not in the source HTML. Help me confirm what was inserted at runtime.
<ul id="tasks"> <li>Write weekly report</li></ul>Adding a DOM node changes the current page, but surviving refresh depends on real persistence.
The browser parses the document first: The browser reads HTML and organizes its elements, text, and attributes into a hierarchy of nodes that begins the page render.
A script can change the tree: After a click, JavaScript can create, remove, or change nodes, so the DOM in Elements may differ from the original HTML file.
After clicking Add, inspect whether the runtime DOM contains the new task node and identify which script inserted it. Then refresh to determine whether this was only a DOM update or was persisted. Do not treat a visible node as proof of a database write.