mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-25 22:33:44 +00:00
docs(jqLite): update the minErr codes for on() and off()
This commit is contained in:
parent
3824e40011
commit
b3087421f2
4 changed files with 9 additions and 9 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
@ngdoc error
|
@ngdoc error
|
||||||
@name jqLite:off_args
|
@name jqLite:offargs
|
||||||
@fullName Invalid jqLite#off() parameter
|
@fullName Invalid jqLite#off() parameter
|
||||||
@description
|
@description
|
||||||
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
@ngdoc error
|
@ngdoc error
|
||||||
@name jqLite:on_args
|
@name jqLite:onargs
|
||||||
@fullName Invalid jqLite#on() Parameters
|
@fullName Invalid jqLite#on() Parameters
|
||||||
@description
|
@description
|
||||||
|
|
||||||
|
|
@ -194,7 +194,7 @@ function JQLiteDealoc(element){
|
||||||
}
|
}
|
||||||
|
|
||||||
function JQLiteOff(element, type, fn, unsupported) {
|
function JQLiteOff(element, type, fn, unsupported) {
|
||||||
if (isDefined(unsupported)) throw jqLiteMinErr('off_args', 'jqLite#off() does not support the `selector` argument');
|
if (isDefined(unsupported)) throw jqLiteMinErr('offargs', 'jqLite#off() does not support the `selector` argument');
|
||||||
|
|
||||||
var events = JQLiteExpandoStore(element, 'events'),
|
var events = JQLiteExpandoStore(element, 'events'),
|
||||||
handle = JQLiteExpandoStore(element, 'handle');
|
handle = JQLiteExpandoStore(element, 'handle');
|
||||||
|
|
@ -633,7 +633,7 @@ forEach({
|
||||||
dealoc: JQLiteDealoc,
|
dealoc: JQLiteDealoc,
|
||||||
|
|
||||||
on: function onFn(element, type, fn, unsupported){
|
on: function onFn(element, type, fn, unsupported){
|
||||||
if (isDefined(unsupported)) throw jqLiteMinErr('on_args', 'jqLite#on() does not support the `selector` or `eventData` parameters');
|
if (isDefined(unsupported)) throw jqLiteMinErr('onargs', 'jqLite#on() does not support the `selector` or `eventData` parameters');
|
||||||
|
|
||||||
var events = JQLiteExpandoStore(element, 'events'),
|
var events = JQLiteExpandoStore(element, 'events'),
|
||||||
handle = JQLiteExpandoStore(element, 'handle');
|
handle = JQLiteExpandoStore(element, 'handle');
|
||||||
|
|
|
||||||
|
|
@ -886,15 +886,15 @@ describe('jqLite', function() {
|
||||||
|
|
||||||
expect(function() {
|
expect(function() {
|
||||||
elm.on('click', anObj, callback);
|
elm.on('click', anObj, callback);
|
||||||
}).toThrow();
|
}).toThrowMatching(/\[jqLite\:onargs\]/);
|
||||||
|
|
||||||
expect(function() {
|
expect(function() {
|
||||||
elm.on('click', null, aString, callback);
|
elm.on('click', null, aString, callback);
|
||||||
}).toThrow();
|
}).toThrowMatching(/\[jqLite\:onargs\]/);
|
||||||
|
|
||||||
expect(function() {
|
expect(function() {
|
||||||
elm.on('click', aValue, callback);
|
elm.on('click', aValue, callback);
|
||||||
}).toThrow();
|
}).toThrowMatching(/\[jqLite\:onargs\]/);
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -1059,7 +1059,7 @@ describe('jqLite', function() {
|
||||||
aElem.on('click', noop);
|
aElem.on('click', noop);
|
||||||
expect(function () {
|
expect(function () {
|
||||||
aElem.off('click', noop, '.test');
|
aElem.off('click', noop, '.test');
|
||||||
}).toThrowMatching(/\[jqLite:off_args\]/);
|
}).toThrowMatching(/\[jqLite:offargs\]/);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue