mirror of
https://github.com/liriliri/eruda.git
synced 2026-03-20 09:38:37 +08:00
Fix: Elements select error
This commit is contained in:
14
eustia/isErudaEl.js
Normal file
14
eustia/isErudaEl.js
Normal file
@@ -0,0 +1,14 @@
|
||||
function exports(el)
|
||||
{
|
||||
var parentNode = el.parentNode;
|
||||
|
||||
if (!parentNode) return false;
|
||||
|
||||
while (parentNode)
|
||||
{
|
||||
parentNode = parentNode.parentNode;
|
||||
if (parentNode && parentNode.id === 'eruda') return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
Reference in New Issue
Block a user