Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GImageAsset - unhandled onerror state (HTML context) #42

Open
ErikRichter2 opened this issue Jun 22, 2017 · 0 comments
Open

GImageAsset - unhandled onerror state (HTML context) #42

ErikRichter2 opened this issue Jun 22, 2017 · 0 comments

Comments

@ErikRichter2
Copy link

https://screenshots.pixelfederation.com/da/7k16l18jxu3jig3b7dovjgd4s.png

override public function load():Void {
    g2d_imageElement = Browser.document.createImageElement();
    g2d_imageElement.onload = loadedHandler;
    g2d_imageElement.onerror = errorHandler;
    g2d_imageElement.src = g2d_url;
}

private function errorHandler(event:Event):Void {
    g2d_type = GImageAssetType.IMAGEELEMENT;
    g2d_loaded = false;
    onFailed.dispatch(this);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant