Why can't you get the properties of an object after you get it?

tested online, I can"t get the offsetLeft attribute of an element after I get it, but I can see the value after assigning the value of this attribute to the attribute of
other objects. What"s even weirder is that I don"t have this situation locally. Why?

online:

clipboard.png

clipboard.png

clipboard.png

:

clipboard.png

clipboard.png

Mar.16,2022

mostly because compression is used and then sourceMap is enabled, chrome devtools is not smart enough. Tooltips can identify the variables of the source code, but the error is reported when taking the attribute.

The

way is to find the real variable name of the compressed el, and then add the real variable name .offsetLeft to the watch.


breakpoints are sometimes problematic-- you can console.log to see the object json.stringify first

.
Menu