aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/content/error/jqLite/offargs.ngdoc (renamed from docs/content/error/jqLite/off_args.ngdoc)4
-rw-r--r--docs/content/error/jqLite/onargs.ngdoc (renamed from docs/content/error/jqLite/on_args.ngdoc)2
-rw-r--r--src/jqLite.js4
-rw-r--r--test/jqLiteSpec.js8
4 files changed, 9 insertions, 9 deletions
diff --git a/docs/content/error/jqLite/off_args.ngdoc b/docs/content/error/jqLite/offargs.ngdoc
index 04147242..44e2ca7c 100644
--- a/docs/content/error/jqLite/off_args.ngdoc
+++ b/docs/content/error/jqLite/offargs.ngdoc
@@ -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. \ No newline at end of file
+that `jqLite#off` does not support namespaces or selectors like jQuery.
diff --git a/docs/content/error/jqLite/on_args.ngdoc b/docs/content/error/jqLite/onargs.ngdoc
index cba1e530..34a96b3a 100644
--- a/docs/content/error/jqLite/on_args.ngdoc
+++ b/docs/content/error/jqLite/onargs.ngdoc
@@ -1,5 +1,5 @@
@ngdoc error
-@name jqLite:on_args
+@name jqLite:onargs
@fullName Invalid jqLite#on() Parameters
@description
diff --git a/src/jqLite.js b/src/jqLite.js
index 76031182..6ac99987 100644
--- a/src/jqLite.js
+++ b/src/jqLite.js
@@ -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');
diff --git a/test/jqLiteSpec.js b/test/jqLiteSpec.js
index f8d71bc9..abfad064 100644
--- a/test/jqLiteSpec.js
+++ b/test/jqLiteSpec.js
@@ -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\]/);
});
}
});