Use AppName.embed instead lime.embed for HTML5 by default

This commit is contained in:
Joshua Granick
2016-12-22 14:34:33 -08:00
parent 1ea331e47a
commit 592665629d
2 changed files with 10 additions and 9 deletions

View File

@@ -115,14 +115,7 @@ class ApplicationMain {
#if (js && html5) #if (js && html5)
@:keep @:expose("lime.::APP_FILE::.embed") @:keep @:expose("::APP_FILE::.embed")
public static function __embed (element:Dynamic, width:Null<Int> = null, height:Null<Int> = null, background:String = null, assetsPrefix:String = null) {
embed (element, width, height, background, assetsPrefix);
}
@:keep @:expose("lime.embed")
public static function embed (element:Dynamic, width:Null<Int> = null, height:Null<Int> = null, background:String = null, assetsPrefix:String = null) { public static function embed (element:Dynamic, width:Null<Int> = null, height:Null<Int> = null, background:String = null, assetsPrefix:String = null) {
var htmlElement:js.html.Element = null; var htmlElement:js.html.Element = null;
@@ -180,6 +173,14 @@ class ApplicationMain {
create (); create ();
} }
@:keep @:expose("lime.embed")
public static function _embed (element:Dynamic, width:Null<Int> = null, height:Null<Int> = null, background:String = null, assetsPrefix:String = null) {
embed (element, width, height, background, assetsPrefix);
}
#end #end

View File

@@ -49,7 +49,7 @@
<div id="content"></div> <div id="content"></div>
<script type="text/javascript"> <script type="text/javascript">
lime.embed ("content", ::WIN_WIDTH::, ::WIN_HEIGHT::, "::WIN_FLASHBACKGROUND::"); ::APP_FILE::.embed ("content", ::WIN_WIDTH::, ::WIN_HEIGHT::, "::WIN_FLASHBACKGROUND::");
</script> </script>
</body> </body>