I have this code for a popup system for a forum I'm making, but the code is not working on google chrome, yet it works on mobile safari.
document.getElementById('test').innerHTML="JAVASCRIPT IS FULLY FUNCTIONAL";
var w=window.innerWidth;
var h=Math.ceil(window.innerHeight/19);
var popup=new Kinetic.Stage({container:'notification',height:h,width:w});
var pla=new Kinetic.Layer();
var box=new Kinetic.Rect({x:0,y:0,width:w,height:h,fill:'#646362'});
pla.add(box);
avio=new Image();
avio.onload=function()
{
var avi=new Kinetic.Image({x:3,y:3,image:avio,width:40,height:40});
pla.add(avi);
alert('test');
popup.add(pla);
}
avio.src="testavi.png";
Works for me on Chrome27/Win7.
By any chance are you getting a security alert in Chrome Inspector--Could be CORS?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.