Issue metadata
Sign in to add a comment
|
Debugger: Scope this is different than actual value
Reported by
nicolas....@gmail.com,
Jul 24 2017
|
||||||||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36
Steps to reproduce the problem:
1. Open the devtools
2. Type the following code:
class toto {
bindEvent() {
document.addEventListener('keyup', (event) => {
debugger;
console.log(this);
});
}
}
new toto().bindEvent();
3. select the html window and press a key
What is the expected behavior?
In the Scope debugger panel, when the breakpoint is reached, "this" should be "toto {}".
What went wrong?
"this" appears to be the document element.document.
But typing "this" in the Chrome console correctly returns "toto {}".
Did this work before? N/A
Chrome version: 59.0.3071.115 Channel: stable
OS Version: 10.0
Flash Version:
,
Jul 25 2017
Duplicate of issue 678456 .
,
Jul 25 2017
Seems similar to the bug 678456 .Hence merging this into 678456. Please feel free to undupe if not similar. Thanks, |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by ligim...@chromium.org
, Jul 24 2017