Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Unified Diff: sdk/lib/_internal/lib/native_helper.dart

Issue 46313005: Fix to distingish Document from HtmlDocument on ie9 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/html/document_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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") {
« no previous file with comments | « no previous file | tests/html/document_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698