Skip to content

Commit

Permalink
Merge pull request #17 from canjs/namespace
Browse files Browse the repository at this point in the history
adding enter event to can-namespace
  • Loading branch information
phillipskevin authored Feb 1, 2018
2 parents 0a3c892 + 1257399 commit 504136a
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6,683 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ node_modules

docs/
dist/
package-lock.json
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
5 changes: 5 additions & 0 deletions can-event-dom-enter-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ var unit = require('steal-qunit');
var domEvents = require('can-dom-events');
var definition = require('./can-event-dom-enter');
var compat = require('./compat');
var canNamespace = require('can-namespace');
var enterEventType = 'test-enter';

function makeEnterEvent() {
Expand Down Expand Up @@ -185,3 +186,7 @@ unit.test("can use custom addEventListener and removeEventListener (#3)", functi
}
},button,"enter", handler);
});

unit.test("adds event to can-namespace", function(assert) {
assert.equal(canNamespace.domEventEnter, definition, "event is added");
});
3 changes: 2 additions & 1 deletion can-event-dom-enter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'use strict';
var namespace = require('can-namespace');

var baseEventType = 'keyup';

Expand Down Expand Up @@ -71,4 +72,4 @@ var enterEvent = {
_eventTypeHandlerMap: {}
};

module.exports = enterEvent;
module.exports = namespace.domEventEnter = enterEvent;
Loading

0 comments on commit 504136a

Please sign in to comment.