-
-
Save jakemac53/a5d272982ae3232d4dff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Dynamically injects an html import, but gives the warning | |
// `URL must be imported by main Dart script: foo.dart` | |
@HtmlImport('foo.html') | |
library foo; | |
import 'package:web_components/web_components.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="application/dart" src="foo.dart"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:foo/foo.dart'; | |
import 'package:initialize/initialize.dart' as init; | |
main() { | |
// Crawls imports looking for @HtmlImport and does dynamic injection | |
init.run(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="application/dart" href="index.dart"></script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment