Skip to content

Commit cc2796a

Browse files
committed
deprecations: s/find/query and moving event() to nbubna/Eventier
1 parent 3e9f299 commit cc2796a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/core.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,11 @@
8383
//self.length === 1 ? results[0] :
8484
results;
8585
},
86-
find: function(selector) {
86+
find: function() {
87+
try{ window.console.warn('find() is deprecated. Please use query().'); }
88+
finally{ return this.query.apply(this, arguments); }
89+
},
90+
query: function(selector) {
8791
var self = this.forEach ? this : [this];
8892
for (var list=[], i=0, m=self.length; i<m; i++) {
8993
var nodes = self[i].querySelectorAll(selector);

src/event.js

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
var _ = HTML._,
55
event = _.fn.event = function() {
6+
try{ window.console.warn('event() is deprecated. https://github.com/nbubna/HTML/issues/1'); } catch(e){}
67
var args = _.slice.call(arguments),
78
self = this,
89
action,

0 commit comments

Comments
 (0)