Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cto
g1
Commits
4cd4b08f
Commit
4cd4b08f
authored
Dec 23, 2017
by
S Anand
Browse files
TST: bind to events only once for testing
parent
47ce8710
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/
jquery.
util.js
→
src/
_
util.js
View file @
4cd4b08f
File moved
src/jquery.urlfilter.js
View file @
4cd4b08f
import
{
parse
}
from
'
./url.js
'
import
{
hasdata
}
from
'
./
jquery.
util.js
'
import
{
hasdata
}
from
'
./
_
util.js
'
export
function
urlfilter
(
options
)
{
options
=
options
||
{}
...
...
test/jquery.urlfilter.html
View file @
4cd4b08f
...
...
@@ -137,15 +137,15 @@
$
(
'
.selector-div, .selector-iframe
'
).
each
(
function
()
{
var
$this
=
$
(
this
)
var
$target
=
$
(
$this
.
data
(
'
target
'
))
.
on
(
'
load
'
,
function
(
e
)
{
.
on
e
(
'
load
'
,
function
(
e
)
{
t
.
equal
(
e
.
type
,
'
load
'
,
'
load event
'
)
t
.
equal
(
$target
.
attr
(
'
src
'
),
'
empty.html?y=1&x=1
'
)
t
.
ok
(
e
.
url
)
t
.
ok
(
e
.
url
,
'
load event url exists
'
)
})
$this
.
on
(
'
urlfilter
'
,
function
(
e
)
{
.
on
e
(
'
urlfilter
'
,
function
(
e
)
{
t
.
equal
(
e
.
type
,
'
urlfilter
'
,
'
urlfilter event
'
)
t
.
ok
(
e
.
url
)
t
.
ok
(
e
.
url
,
'
urlfilter event url exists
'
)
})
.
dispatch
(
'
click
'
)
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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