|
|
@ -429,13 +429,21 @@ $.fn.tab = function(parameters) { |
|
|
|
? evaluateScripts |
|
|
|
: settings.evaluateScripts |
|
|
|
; |
|
|
|
if(evaluateScripts) { |
|
|
|
module.debug('Updating HTML and evaluating inline scripts', tabPath, html); |
|
|
|
$tab.html(html); |
|
|
|
if(typeof settings.cacheType == 'string' && settings.cacheType.toLowerCase() == 'dom' && typeof html !== 'string') { |
|
|
|
$tab |
|
|
|
.empty() |
|
|
|
.append($(html).clone(true)) |
|
|
|
; |
|
|
|
} |
|
|
|
else { |
|
|
|
module.debug('Updating HTML', tabPath, html); |
|
|
|
tab.innerHTML = html; |
|
|
|
if(evaluateScripts) { |
|
|
|
module.debug('Updating HTML and evaluating inline scripts', tabPath, html); |
|
|
|
$tab.html(html); |
|
|
|
} |
|
|
|
else { |
|
|
|
module.debug('Updating HTML', tabPath, html); |
|
|
|
tab.innerHTML = html; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
@ -467,7 +475,17 @@ $.fn.tab = function(parameters) { |
|
|
|
} |
|
|
|
settings.onFirstLoad.call($tab[0], tabPath, parameterArray, historyEvent); |
|
|
|
settings.onLoad.call($tab[0], tabPath, parameterArray, historyEvent); |
|
|
|
if(settings.cacheType != 'response') { |
|
|
|
|
|
|
|
if(typeof settings.cacheType == 'string' && settings.cacheType.toLowerCase() == 'dom' && $tab.children().length > 0) { |
|
|
|
setTimeout(function() { |
|
|
|
let |
|
|
|
$clone = $tab.children().clone(true) |
|
|
|
; |
|
|
|
$clone = $clone.not('script'); |
|
|
|
module.cache.add(fullTabPath, $clone); |
|
|
|
}, 0); |
|
|
|
} |
|
|
|
else { |
|
|
|
module.cache.add(fullTabPath, $tab.html()); |
|
|
|
} |
|
|
|
}, |
|
|
|