From 87a11d6772909af55151bc98ab11820da199ef55 Mon Sep 17 00:00:00 2001 From: jlukic Date: Fri, 9 Jan 2015 16:54:55 -0500 Subject: [PATCH] Remove proxy calls from tab and visit --- src/definitions/behaviors/visit.js | 4 ++-- src/definitions/modules/tab.js | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/definitions/behaviors/visit.js b/src/definitions/behaviors/visit.js index 5840a694e..e471329b2 100644 --- a/src/definitions/behaviors/visit.js +++ b/src/definitions/behaviors/visit.js @@ -233,10 +233,10 @@ $.visit = $.fn.visit = function(parameters) { if(settings.limit) { if(value >= settings.limit) { module.debug('Pages viewed exceeded limit, firing callback', value, settings.limit); - $.proxy(settings.onLimit, element)(value); + settings.onLimit.call(element, value); } module.debug('Limit not reached', value, settings.limit); - $.proxy(settings.onChange, element)(value); + settings.onChange.call(element, value); } module.update.display(value); } diff --git a/src/definitions/modules/tab.js b/src/definitions/modules/tab.js index b17b625c8..48914e179 100644 --- a/src/definitions/modules/tab.js +++ b/src/definitions/modules/tab.js @@ -297,8 +297,8 @@ $.fn.tab = function(parameters) { firstLoad = false; module.cache.add(tabPath, $tab.html()); module.activate.all(currentPath); - $.proxy(settings.onTabInit, $tab)(currentPath, parameterArray, historyEvent); - $.proxy(settings.onTabLoad, $tab)(currentPath, parameterArray, historyEvent); + settings.onTabInit.call($tab, currentPath, parameterArray, historyEvent); + settings.onTabLoad.call($tab, currentPath, parameterArray, historyEvent); } return false; } @@ -308,9 +308,9 @@ $.fn.tab = function(parameters) { if( !module.cache.read(currentPath) ) { module.cache.add(currentPath, true); module.debug('First time tab loaded calling tab init'); - $.proxy(settings.onTabInit, $tab)(currentPath, parameterArray, historyEvent); + settings.onTabInit.call($tab, currentPath, parameterArray, historyEvent); } - $.proxy(settings.onTabLoad, $tab)(currentPath, parameterArray, historyEvent); + settings.onTabLoad.call($tab, currentPath, parameterArray, historyEvent); } } else if(tabPath.search('/') == -1 && tabPath !== '') { @@ -325,7 +325,7 @@ $.fn.tab = function(parameters) { if( !module.cache.read(currentPath) ) { module.cache.add(currentPath, true); module.debug('First time tab loaded calling tab init'); - $.proxy(settings.onTabInit, $tab)(currentPath, parameterArray, historyEvent); + settings.onTabInit.call($tab, currentPath, parameterArray, historyEvent); } return false; } @@ -355,8 +355,8 @@ $.fn.tab = function(parameters) { else { module.debug('Content loaded in background', tabPath); } - $.proxy(settings.onTabInit, $tab)(tabPath, parameterArray, historyEvent); - $.proxy(settings.onTabLoad, $tab)(tabPath, parameterArray, historyEvent); + settings.onTabInit.call($tab, tabPath, parameterArray, historyEvent); + settings.onTabLoad.call($tab, tabPath, parameterArray, historyEvent); }, urlData: { tab: fullTabPath } }, @@ -373,7 +373,7 @@ $.fn.tab = function(parameters) { module.debug('Showing existing content', fullTabPath); module.content.update(tabPath, cachedContent); module.activate.tab(tabPath); - $.proxy(settings.onTabLoad, $tab)(tabPath, parameterArray, historyEvent); + settings.onTabLoad.call($tab, tabPath, parameterArray, historyEvent); } else if(existingRequest) { module.debug('Content is already loading', fullTabPath);