All pastes #590441 Raw Edit

Someone

public text v1 · immutable
#590441 ·published 2007-06-26 15:44 UTC
rendered paste body
Style.prototype.map=function(s){for(var a in s) if(s[a]) this[a]=s[a];return this}
function n(o,p){var a,r=new o();if(p) for(a in p) r[a]=p[a];return r}

function bp()
{
	var w=new Window("abc"),
		f=n(Frame,{window:w,height:20,width:100}),
		cs=n(Canvas,{height:20,width:20}),c=cs.getContext("2d"),
		t=n(Text,{vOffset:15,hOffset:25});
	f.appendChild(cs);
	f.appendChild(t);
	f.style.background="rgba(128,128,128,1)";
	t.style.map({color:"#FFF",fontWeight:700,fontFamily:"Verdana",fontSize:"15px"});

//	t.data=$loc("next");
	t.data="next";
	c.strokeStyle="#FFF";c.lineWidth=3;
	c.beginPath();c.arc(10,10,8,0,2*Math.PI,0);c.stroke();
	return w;
}
//the created window wioll disapear if I dont have a variable points to it.
//didnt 3.0 introduce the exact opposite behaviour ?
//var tst=bp();		
bp();