mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-10-22 17:05:32 +02:00
Merge pull request #70 from jeffreyguo/pulls/jserror
wait for DOM to remove attribute
This commit is contained in:
commit
6e13a68762
@ -114,10 +114,11 @@ JS;
|
||||
}
|
||||
|
||||
$javascript = <<<JS
|
||||
(function() {
|
||||
var body = document.getElementsByTagName('body')[0];
|
||||
body.removeAttribute('data-jserrors');
|
||||
})();
|
||||
if ('undefined' !== typeof window.jQuery) {
|
||||
$(document).ready(function() {
|
||||
window.jQuery('body').removeAttribute('data-jserrors');
|
||||
});
|
||||
}
|
||||
JS;
|
||||
|
||||
$this->getSession()->executeScript($javascript);
|
||||
|
Loading…
Reference in New Issue
Block a user