Skip to content

Commit 9a8c7d5

Browse files
ENGCOM-957: 2.3 devel 14172 set timeout #14173
- Merge Pull Request #14173 from jonathanKingston/magento2:2.3-devel_14172-setTimeout - Merged commits: 1. e501f67 2. 0684b13
2 parents 8088a14 + 0684b13 commit 9a8c7d5

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

app/code/Magento/Integration/Controller/Adminhtml/Integration/LoginSuccessCallback.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ class LoginSuccessCallback extends \Magento\Integration\Controller\Adminhtml\Int
1515
*/
1616
public function execute()
1717
{
18-
$this->getResponse()->setBody('<script>setTimeout("self.close()",1000);</script>');
18+
$this->getResponse()->setBody('<script>setTimeout(self.close.bind(this), 1000);</script>');
1919
}
2020
}

app/code/Magento/Ui/view/base/web/js/lib/view/utils/raf.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ define([
1919
window.onRequestAnimationFrame ||
2020
window.msRequestAnimationFrame ||
2121
function (callback) {
22+
if (typeof callback != 'function') {
23+
throw new Error('raf argument "callback" must be of type function');
24+
}
2225
window.setTimeout(callback, 1000 / 60);
2326
};
2427

0 commit comments

Comments
 (0)