Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F121699091
collectSiblings.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Jul 13, 06:39
Size
438 B
Mime Type
text/x-java
Expires
Tue, Jul 15, 06:39 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27376404
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
collectSiblings.js
View Options
import
matches
from
'./matches'
;
export
default
function
collectSiblings
(
node
,
refNode
,
selector
)
{
if
(
refNode
===
void
0
)
{
refNode
=
null
;
}
if
(
selector
===
void
0
)
{
selector
=
null
;
}
var
siblings
=
[];
for
(;
node
;
node
=
node
.
nextElementSibling
)
{
if
(
node
!==
refNode
)
{
if
(
selector
&&
matches
(
node
,
selector
))
{
break
;
}
siblings
.
push
(
node
);
}
}
return
siblings
;
}
Event Timeline
Log In to Comment