-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Class private property evaluates as undefined in the Console in Edge, but not in Chrome #259
Comments
Thank you for reporting this here. I have two questions:
Thank you. |
@captainbrosset Hi,
|
@datvm if you can, please send the file over as a private message either on my twitter or mastodon account, which are linked to from my github account page: https://github.com/captainbrosset/ |
@captainbrosset thanks, sent you an email. |
Thank you @datvm. It took me a bit of time, but I did find a reduced test case. This has nothing to do with your specific extension code, but instead seems to be a bug with the way DevTools evaluates private properties. Here is the reduced test case: <!DOCTYPE html>
<script>
class Foo {
#bar = 1;
constructor () {
console.log(this.#bar);
debugger;
}
}
new Foo();
</script> When you run this, the console shows I was also able to verify that this worked fine in Chrome, just not in Edge. I'll bring this up with our dev team and make sure the bug is tracked on our backlog. Thank you for filing. |
@captainbrosset Hi, thank you for the info. Please note that in your code, the issue only happens to the printed out Console, however, in my extension code, the whole expression actually gets evaluated incorrectly. For example, I added an
In the above code, the |
That is very surprising. If there's indeed an issue with the running code (whether DevTools is opened or not), then that is a different bug with the V8 scripting engine. What's surprising is that we use the exact same as Chrome does. So I don't expect there to be any differences. Note that the DevTools bug ( I suggest waiting for a fix to make it to the next Edge Canary, and then test again to see if your issue goes away. |
@captainbrosset Maybe an issue when the method is
In Edge, my tasks all ran at the same time without delay (that's why I used DevTools to inspect the issue to begin with). I am 90% sure the issue happens without DevTools being opened. In Chrome, the tasks are correctly delayed. |
@datvm would you have time to test something please? |
Hi just tested on Edge Canary 128.0.2709. Everything looks good including the code logic. |
Great to hear. Thanks for testing. Closing this issue now. |
Please see this question here on Microsoft Learn where it's confirmed it is apparently a bug in Microsoft Edge.
I am encountering an issue where a variable is assigned a value, but the value is always
undefined
in Microsoft Edge. Strangely, the same code works as expected in Google Chrome. I have confirmed the assigned value is notundefined
, and checked that the code does not have any way to assignundefined
to the variable. Even though hovering over the variable in DevTools shows the correct value, evaluating the variable in the console still results inundefined
. Here is the relevant code:I believe this is a bug in Microsoft Edge. When I sideloaded the same extension into Google Chrome, the bug did not occur. Please let me know if you need more information.
AB#52257933
The text was updated successfully, but these errors were encountered: