>>1
>俺は一つのウィンドウを作って、そこに黄色の四角形を一つ描画したい。

↓これを Safari の URL バーに貼ればオケ。Firefox や Chrome でも動くと思う。

javascript:document.write("<canvas id=cn width=10 height=10></canvas>");cn=document.getElementById("cn");ctx=cn.getContext('2d');ctx.fillStyle='rgb(255,255,0)';ctx.fillRect(0,0,10,10);