Last updated 2 years ago
Was this helpful?
replit:
// ๐ธ node.isInPage Object.defineProperty(Node.prototype, 'isInPage', { get() { return document.body.contains(this) } });
ไธ็ฎกไธๅ HTMLElement ๆฏ display:noneใvisibility:hiddenใopacity:0 ็ญ็ญ๏ผๅช่ฆๅฎๅจ DOM ่ฃก้ข๏ผnode.isInPage ๅฐฑๆฏ trueใ
node.isInPage
CSS/JS/HTML visible space clickable --------------------------------------------------- CSS opacity: 0 โ โ โ CSS visibility: hidden โ โ โ CSS display: none โ โ โ JS .hidden = false โ โ โ HTML <... hidden> โ โ โ
Node โฉ - check if a node is a descendant of a given node. (itself included)
HTMLElement โฉ - quite different from using CSS .
HTML โฉ โฉ
CSS โฉ
CSSTrick โฉ
ๅ๏ผใHTML attribute is equivalent to propertyโใ
display
hidden