61
rated 0 times
[
67]
[
6]
/ answers: 1 / hits: 15094
/ 8 Years ago, thu, august 18, 2016, 12:00:00
I have the problem that this JavaScript snippet runs in Firefox / Chrome without any problem, and Safari I get error: SyntaxError: Unexpected token '>'.
Here's the code:
window.onclick = (test) => {
const googleWindow = window.open();
fakeAjax(response => {
googleWindow.location.replace(`https://google.com?q=${response}`);
});
};
function fakeAjax(callback) {
setTimeout(() => {
callback('example');
}, 1);
}
I've googled and have already seen here in the forum, the problem there appears often, unfortunately I have not found a suitable solution.
Thank you in advance
Best regards
More From » safari