mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +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,7 +1,7 @@
|
|||
@ngdoc error
|
||||
@name jqLite:off_args
|
||||
@name jqLite:offargs
|
||||
@fullName Invalid jqLite#off() parameter
|
||||
@description
|
||||
|
||||
This error occurs when trying to pass too many arguments to `jqLite#off`. Note
|
||||
that `jqLite#off` does not support namespaces or selectors like jQuery.
|
||||
that `jqLite#off` does not support namespaces or selectors like jQuery.
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
@ngdoc error
|
||||
@name jqLite:on_args
|
||||
@name jqLite:onargs
|
||||
@fullName Invalid jqLite#on() Parameters
|
||||
@description
|
||||
|
||||
|
|
@ -194,7 +194,7 @@ function JQLiteDealoc(element){
|
|||
}
|
||||
|
||||
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'),
|
||||
handle = JQLiteExpandoStore(element, 'handle');
|
||||
|
|
@ -633,7 +633,7 @@ forEach({
|
|||
dealoc: JQLiteDealoc,
|
||||
|
||||
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'),
|
||||
handle = JQLiteExpandoStore(element, 'handle');
|
||||
|
|
|
|||
|
|
@ -886,15 +886,15 @@ describe('jqLite', function() {
|
|||
|
||||
expect(function() {
|
||||
elm.on('click', anObj, callback);
|
||||
}).toThrow();
|
||||
}).toThrowMatching(/\[jqLite\:onargs\]/);
|
||||
|
||||
expect(function() {
|
||||
elm.on('click', null, aString, callback);
|
||||
}).toThrow();
|
||||
}).toThrowMatching(/\[jqLite\:onargs\]/);
|
||||
|
||||
expect(function() {
|
||||
elm.on('click', aValue, callback);
|
||||
}).toThrow();
|
||||
}).toThrowMatching(/\[jqLite\:onargs\]/);
|
||||
|
||||
});
|
||||
}
|
||||
|
|
@ -1059,7 +1059,7 @@ describe('jqLite', function() {
|
|||
aElem.on('click', noop);
|
||||
expect(function () {
|
||||
aElem.off('click', noop, '.test');
|
||||
}).toThrowMatching(/\[jqLite:off_args\]/);
|
||||
}).toThrowMatching(/\[jqLite:offargs\]/);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue