Skip to content

Commit

Permalink
replace deprecated __proto__ from js code (#2500)
Browse files Browse the repository at this point in the history
* replace deprecated __proto__ from js code

* updated changelog

* Update dwds/lib/src/debugging/inspector.dart

Co-authored-by: Derek Xu <xuderekq@hotmail.com>

* Update dwds/CHANGELOG.md

Co-authored-by: Derek Xu <xuderekq@hotmail.com>

---------

Co-authored-by: Derek Xu <xuderekq@hotmail.com>
  • Loading branch information
jyameo and derekxu16 authored Oct 1, 2024
1 parent c63ad2d commit c408f7f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions dwds/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## 24.2.0-wip
- Replace deprecated JS code `this.__proto__` with `Object.getPrototypeOf(this)` - [#2500](https://github.com/dart-lang/webdev/pull/2500)

## 24.1.0

Expand Down
2 changes: 1 addition & 1 deletion dwds/lib/src/debugging/inspector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ class AppInspector implements AppInspectorInterface {
// We use the JS pseudo-variable 'arguments' to get the list of all arguments.
final send = '''
function () {
if (!(this.__proto__)) { return 'Instance of PlainJavaScriptObject';}
if (!Object.getPrototypeOf(this)) { return 'Instance of PlainJavaScriptObject';}
return ${globalToolConfiguration.loadStrategy.loadModuleSnippet}("dart_sdk").dart.dsendRepl(this, "$methodName", arguments);
}
''';
Expand Down

0 comments on commit c408f7f

Please sign in to comment.