Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
fix(jqLite): properly detect unsupported calls for on()/off()
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorMinar committed Aug 9, 2013
1 parent 953fa4c commit 3824e40
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/jqLite.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ function JQLiteDealoc(element){
}
}

function JQLiteOff(element, type, fn, selector) {
if (isDefined(selector)) throw jqLiteMinErr('off_args', 'jqLite#off() does not support the `selector` argument');
function JQLiteOff(element, type, fn, unsupported) {
if (isDefined(unsupported)) throw jqLiteMinErr('off_args', 'jqLite#off() does not support the `selector` argument');

var events = JQLiteExpandoStore(element, 'events'),
handle = JQLiteExpandoStore(element, 'handle');
Expand Down Expand Up @@ -632,8 +632,8 @@ forEach({

dealoc: JQLiteDealoc,

on: function onFn(element, type, fn, other1){
if ( isDefined(other1) ) throw jqLiteMinErr('on_args', 'jqLite#on() does not support the `selector` or `eventData` parameters');
on: function onFn(element, type, fn, unsupported){
if (isDefined(unsupported)) throw jqLiteMinErr('on_args', 'jqLite#on() does not support the `selector` or `eventData` parameters');

var events = JQLiteExpandoStore(element, 'events'),
handle = JQLiteExpandoStore(element, 'handle');
Expand Down

0 comments on commit 3824e40

Please sign in to comment.