| Index: sdk/lib/_internal/lib/native_helper.dart
|
| diff --git a/sdk/lib/_internal/lib/native_helper.dart b/sdk/lib/_internal/lib/native_helper.dart
|
| index 3ad8b6cafe9ccba4104f0ce099dbb5e2390e2645..03b0ef5ba4940d920ae716238974342ac0ff9593 100644
|
| --- a/sdk/lib/_internal/lib/native_helper.dart
|
| +++ b/sdk/lib/_internal/lib/native_helper.dart
|
| @@ -532,8 +532,10 @@ function(hooks) {
|
| if (tag == "Document") {
|
| // IE calls both HTML and XML documents "Document", so we check for the
|
| // xmlVersion property, which is the empty string on HTML documents.
|
| - if (!!o.xmlVersion) return "Document";
|
| - return "HTMLDocument";
|
| + // Since both dart:html classes Document and HtmlDocument share the same
|
| + // type, we must patch the instances and not the prototype.
|
| + if (!!o.xmlVersion) return "!Document";
|
| + return "!HTMLDocument";
|
| }
|
| // Patches for types which report themselves as Objects.
|
| if (tag == "Object") {
|
|
|