Permalink
Browse files

get loaded content from AssetComponent

  • Loading branch information...
felipevex committed Oct 12, 2017
1 parent b96d510 commit 019f89fc10d8091874bf5e388a2e2a87ba2e7da6
Showing with 5 additions and 1 deletion.
  1. +5 −1 priori/assets/AssetComponent.hx
@@ -30,7 +30,6 @@ class AssetComponent extends Asset {
async : true,
cache : true,
dataType : "font",
error : function(e):Void {
this._isLoading = false;
@@ -56,6 +55,11 @@ class AssetComponent extends Asset {
}
}
public function getContent():String {
if (_isLoaded == false) throw "Asset not loaded";
return this._content;
}
override public function getElement():JQuery {
if (_isLoaded == false) {
throw "Asset not loaded";

0 comments on commit 019f89f

Please sign in to comment.