Target Platform html5; Openfl 3.0.3 lime 2.3.3 unable to load images the below function is never called break the callback event loops

hi All,

I am nore sure if anyone else is having this issues. But the loader class for some reasons is not working as expected. This is my first attempt of using openfl to target html.

Please help
var image = new JSImage ();
var image_onLoaded = function (event) {

		buffer = new ImageBuffer (null, image.width, image.height);
		buffer.__srcImage = cast image;
		offsetX = 0;
		offsetY = 0;
		width = buffer.width;
		height = buffer.height;
		trace("I am in");
		if (onload != null) {
			onload (this);
	image.addEventListener ("load", image_onLoaded, false);
	image.src = "data:" + type + ";base64," + base64;

Thank You,