-
-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
setTimeout, setInterval and other interval built in methods do not work, even if I expose them in context.
console.log('start');
setTimeout(()=> {
console.log('hello timeout');
}, 2000);
console.log('end');
output:
start
end
It is to be noted that when I add .bind(this) , then timeout works and breaks at that line saying .bind is not a function.
console.log('start');
setTimeout(()=> {
console.log('hello timeout');
}, 2000).bind(this);
console.log('end');
output:
start
hello timeout
// and an error in console saying setTimeout(...).bind is not a function
Metadata
Metadata
Assignees
Labels
No labels