Skip to content

Commit c0e6d5b

Browse files
committed
Remove unused injection scopes.
1 parent 44bf596 commit c0e6d5b

2 files changed

Lines changed: 52 additions & 56 deletions

File tree

src/ui/KeyEvent.js

Lines changed: 35 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -24,45 +24,43 @@
2424
*
2525
* @extends Event
2626
*/
27-
var KeyEvent = this.KeyEvent = Event.extend(new function() {
28-
return /** @lends KeyEvent# */{
29-
initialize: function(down, key, character, event) {
30-
this.base(event);
31-
this.type = down ? 'keydown' : 'keyup';
32-
this.key = key;
33-
this.character = character;
34-
},
27+
var KeyEvent = this.KeyEvent = Event.extend(/** @lends KeyEvent# */{
28+
initialize: function(down, key, character, event) {
29+
this.base(event);
30+
this.type = down ? 'keydown' : 'keyup';
31+
this.key = key;
32+
this.character = character;
33+
},
3534

36-
/**
37-
* The type of key event.
38-
*
39-
* @name KeyEvent#type
40-
* @type String('keydown', 'keyup')
41-
*/
35+
/**
36+
* The type of key event.
37+
*
38+
* @name KeyEvent#type
39+
* @type String('keydown', 'keyup')
40+
*/
4241

43-
/**
44-
* The string character of the key that caused this key event.
45-
*
46-
* @name KeyEvent#character
47-
* @type String
48-
*/
42+
/**
43+
* The string character of the key that caused this key event.
44+
*
45+
* @name KeyEvent#character
46+
* @type String
47+
*/
4948

50-
/**
51-
* The key that caused this key event.
52-
*
53-
* @name KeyEvent#key
54-
* @type String
55-
*/
49+
/**
50+
* The key that caused this key event.
51+
*
52+
* @name KeyEvent#key
53+
* @type String
54+
*/
5655

57-
/**
58-
* @return {String} A string representation of the key event.
59-
*/
60-
toString: function() {
61-
return '{ type: ' + this.type
62-
+ ', key: ' + this.key
63-
+ ', character: ' + this.character
64-
+ ', modifiers: ' + this.getModifiers()
65-
+ ' }';
66-
}
67-
};
56+
/**
57+
* @return {String} A string representation of the key event.
58+
*/
59+
toString: function() {
60+
return '{ type: ' + this.type
61+
+ ', key: ' + this.key
62+
+ ', character: ' + this.character
63+
+ ', modifiers: ' + this.getModifiers()
64+
+ ' }';
65+
}
6866
});

src/ui/MouseEvent.js

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,22 @@
1919
*
2020
* @extends Event
2121
*/
22-
var MouseEvent = this.MouseEvent = Event.extend(new function() {
23-
return /** @lends MouseEvent# */{
24-
initialize: function(type, point, target, event) {
25-
this.base(event);
26-
this.type = type;
27-
this.point = point;
28-
this.target = target;
29-
},
22+
var MouseEvent = this.MouseEvent = Event.extend(/** @lends MouseEvent# */{
23+
initialize: function(type, point, target, event) {
24+
this.base(event);
25+
this.type = type;
26+
this.point = point;
27+
this.target = target;
28+
},
3029

31-
/**
32-
* @return {String} A string representation of the key event.
33-
*/
34-
toString: function() {
35-
return '{ type: ' + this.type
36-
+ ', point: ' + this.point
37-
+ ', target: ' + this.target
38-
+ ', modifiers: ' + this.getModifiers()
39-
+ ' }';
40-
}
41-
};
30+
/**
31+
* @return {String} A string representation of the key event.
32+
*/
33+
toString: function() {
34+
return '{ type: ' + this.type
35+
+ ', point: ' + this.point
36+
+ ', target: ' + this.target
37+
+ ', modifiers: ' + this.getModifiers()
38+
+ ' }';
39+
}
4240
});

0 commit comments

Comments
 (0)