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

Unified Diff: frog/leg/native_handler.dart

Issue 9535012: Introduce the legium component in test.dart, and start support for dart:dom and dart:html. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 10 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 | « frog/leg/frog_leg.dart ('k') | frog/leg/scanner/scanner_task.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/leg/native_handler.dart
===================================================================
--- frog/leg/native_handler.dart (revision 4786)
+++ frog/leg/native_handler.dart (working copy)
@@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#library('native');
+#import('../../lib/uri/uri.dart');
#import('leg.dart');
#import('elements/elements.dart');
#import('scanner/scannerlib.dart');
@@ -30,8 +31,13 @@
}
}
-void checkNativeSupport(Compiler compiler, LibraryElement library) {
- if (library.script.name.contains('dart/frog/tests/native/src')) {
+void checkNativeSupport(Compiler compiler,
+ LibraryElement library,
+ Uri uri) {
+ String libraryName = uri.toString();
+ if (library.script.name.contains('dart/frog/tests/native/src')
+ || libraryName == 'dart:dom'
+ || libraryName == 'dart:html') {
library.define(new ForeignElement(
const SourceString('native'), library), compiler);
}
« no previous file with comments | « frog/leg/frog_leg.dart ('k') | frog/leg/scanner/scanner_task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698