Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
3e8bc9d9
Commit
3e8bc9d9
authored
7 years ago
by
XhmikosR
Browse files
Options
Download
Email Patches
Plain Diff
Extend `SelectorEngine.find()` to include an `element` first arg.
If not supplied, it'll just use `document`.
parent
3664d149
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
js/src/dom/selectorEngine.js
+2
-2
js/src/dom/selectorEngine.js
with
2 additions
and
2 deletions
+2
-2
js/src/dom/selectorEngine.js
+
2
-
2
View file @
3e8bc9d9
...
...
@@ -46,7 +46,7 @@ const SelectorEngine = {
return
fnMatches
.
call
(
element
,
selector
)
},
find
(
selector
)
{
find
(
element
=
document
,
selector
)
{
if
(
typeof
selector
!==
'
string
'
)
{
return
null
}
...
...
@@ -56,7 +56,7 @@ const SelectorEngine = {
selectorType
=
'
getElementById
'
selector
=
selector
.
substr
(
1
,
selector
.
length
)
}
return
docu
ment
[
selectorType
](
selector
)
return
ele
ment
[
selectorType
](
selector
)
},
closest
(
element
,
selector
)
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets