Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
First pass at hiding JS dependencies from implementation
Create script tags dynamically inside the constructor, pulling the ACE JavaScript libraries from the relative package path. Don't create an instance of the ACE editor until the dynamically created script has loaded. Add a guard in the content setter to prevent calling methods on a JS proxy that might not be up yet. Huge thanks to @santiaago for pairing on this.
- Loading branch information
Showing
4 changed files
with
23 additions
and
8 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
<head> | ||
<script src="packages/ice_code_editor/ace/ace.js" type="text/javascript" charset="utf-8"></script> | ||
<script src="packages/browser/dart.js"></script> | ||
<script src="main.dart" type="application/dart"></script> | ||
|
||
</head> | ||
<h1>Hello</h1> | ||
<div style="width:600px; height: 400px" id="ace"></div> | ||
<div style="width:600px; height: 400px" id="ice"></div> |
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
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
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