mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-10-22 17:05:32 +02:00
Guard against older jQuery versions
This commit is contained in:
parent
51f7fc9e20
commit
10da00c796
@ -134,7 +134,7 @@ JS;
|
||||
}
|
||||
|
||||
$javascript = <<<JS
|
||||
if ('undefined' !== typeof window.jQuery) {
|
||||
if ('undefined' !== typeof window.jQuery && 'undefined' !== typeof window.jQuery.fn.on) {
|
||||
window.jQuery(document).on('ajaxStart.ss.test.behaviour', function(){
|
||||
window.__ajaxStatus = function() {
|
||||
return 'waiting';
|
||||
@ -180,7 +180,7 @@ JS;
|
||||
$this->handleAjaxTimeout();
|
||||
|
||||
$javascript = <<<JS
|
||||
if ('undefined' !== typeof window.jQuery) {
|
||||
if ('undefined' !== typeof window.jQuery && 'undefined' !== typeof window.jQuery.fn.off) {
|
||||
window.jQuery(document).off('ajaxStart.ss.test.behaviour');
|
||||
window.jQuery(document).off('ajaxComplete.ss.test.behaviour');
|
||||
window.jQuery(document).off('ajaxSuccess.ss.test.behaviour');
|
||||
|
Loading…
Reference in New Issue
Block a user