You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the StackFrame object, I would expect a very simple way to get and set properties:
Just access stackframe.filename to read the property
Set the property via stackframe.filename = "myfile.js"
That should be the API regardless of whether or not it is implemented as a getter/setter pair. If there is extra work to do for either, then a getter/setter pair should be used with a hidden property like stackframe._filename, which the user should not be instructed to access directly.
Current Behavior
The current API is confusing and does not make use of actual JS getters and setters. For example:
What happens if I set the property directly? Is that the same as the set method?
What's different about accessing the property vs. the get method? Both are used in the documentation with no explanation.
Furthermore, the typings for the set methods have zero parameters defined.
The text was updated successfully, but these errors were encountered:
Expected Behavior
For the StackFrame object, I would expect a very simple way to get and set properties:
stackframe.filename
to read the propertystackframe.filename = "myfile.js"
That should be the API regardless of whether or not it is implemented as a getter/setter pair. If there is extra work to do for either, then a getter/setter pair should be used with a hidden property like
stackframe._filename
, which the user should not be instructed to access directly.Current Behavior
The current API is confusing and does not make use of actual JS getters and setters. For example:
Furthermore, the typings for the set methods have zero parameters defined.
The text was updated successfully, but these errors were encountered: