first commit
This commit is contained in:
24
bootstrap/node_modules/event-component/test/index.html
generated
vendored
Normal file
24
bootstrap/node_modules/event-component/test/index.html
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Event</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
</head>
|
||||
<body>
|
||||
<a href="/something">link</a>
|
||||
|
||||
<script src="../build/build.js"></script>
|
||||
|
||||
<script>
|
||||
var events = require('event');
|
||||
var a = document.querySelector('a');
|
||||
|
||||
function onclick(e) {
|
||||
e.preventDefault();
|
||||
console.log(e.target);
|
||||
events.unbind(a, 'click', onclick);
|
||||
}
|
||||
|
||||
events.bind(a, 'click', onclick);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user