Groups
Groups
Sign in
Groups
Groups
Wind.js User Groups
Conversations
About
Send feedback
Help
关于$await的和浏览器dom的问题。
7 views
Skip to first unread message
oliverliye
unread,
May 4, 2012, 1:26:41 AM
5/4/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Jscex User Groups
大家好:
下面这段代码
var compareAsync = eval(Jscex.compile("async", function (x, y) {
$await(Jscex.Async.sleep(1000)); // each "compare" takes 10 ms.
return x - y;
}));
再执行$await的时候,是否会影响浏览器dom的绘制;
比如我正在绘制动画的时候,执行它会不是停止动画1秒。
Jeffrey Zhao
unread,
May 4, 2012, 2:10:54 AM
5/4/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Jscex User Groups
不会,Jscex的特点就是同步编码,异步执行。这里的sleep其实就是setTimeout的封装,不会阻塞UI线程(其实在浏览器上也没法阻塞)。
Reply all
Reply to author
Forward
0 new messages