const el = documentfragment.querySelector(".myclass");DocumentFragment: querySelector() method / notebook
DocumentFragment: querySelector() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
<div id="foo\bar"></div>
<div id="foo:bar"></div>document.querySelector("#foo\bar"); // Does not match anything
document.querySelector("#foo\\\\bar"); // Match the first div
document.querySelector("#foo:bar"); // Does not match anything
document.querySelector("#foo\\:bar"); // Match the second div