diff --git a/dwds/CHANGELOG.md b/dwds/CHANGELOG.md index 52b5dbabe..95cd526b0 100644 --- a/dwds/CHANGELOG.md +++ b/dwds/CHANGELOG.md @@ -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 diff --git a/dwds/lib/src/debugging/inspector.dart b/dwds/lib/src/debugging/inspector.dart index 4bde89f75..c13dcf27d 100644 --- a/dwds/lib/src/debugging/inspector.dart +++ b/dwds/lib/src/debugging/inspector.dart @@ -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); } ''';