Skip to content

Commit c408f7f

Browse files
jyameoderekxu16
andauthored
replace deprecated __proto__ from js code (#2500)
* replace deprecated __proto__ from js code * updated changelog * Update dwds/lib/src/debugging/inspector.dart Co-authored-by: Derek Xu <[email protected]> * Update dwds/CHANGELOG.md Co-authored-by: Derek Xu <[email protected]> --------- Co-authored-by: Derek Xu <[email protected]>
1 parent c63ad2d commit c408f7f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Diff for: dwds/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
## 24.2.0-wip
2+
- Replace deprecated JS code `this.__proto__` with `Object.getPrototypeOf(this)` - [#2500](https://github.com/dart-lang/webdev/pull/2500)
23

34
## 24.1.0
45

Diff for: dwds/lib/src/debugging/inspector.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ class AppInspector implements AppInspectorInterface {
215215
// We use the JS pseudo-variable 'arguments' to get the list of all arguments.
216216
final send = '''
217217
function () {
218-
if (!(this.__proto__)) { return 'Instance of PlainJavaScriptObject';}
218+
if (!Object.getPrototypeOf(this)) { return 'Instance of PlainJavaScriptObject';}
219219
return ${globalToolConfiguration.loadStrategy.loadModuleSnippet}("dart_sdk").dart.dsendRepl(this, "$methodName", arguments);
220220
}
221221
''';

0 commit comments

Comments
 (0)