On Dec 21, 2007, at 4:12 AM, Cloud zheng wrote:

Hi, all,

I am trying to use webkit engine to build my application. I want to add
a new javascript object to accomplish some asynchronous operation.

For example, the new javascript object may be named by 'fooObject'. It
has a function names 'longTimeOperation' and one event handler
'onOperationReady'. Because the function may last a long period, so i do
not want it to be a blocked one. When the function is complete, it can
notify the fooObject and fooObejct.onOperationReady can be called back
from webkit engine.

I think it is much like xmlhttprequest method. But i do not how to
implement it.

can anyone help me? thanks a lot...

You could use setTimeout(onOperationReady, 0) to call onOperationReady on a 0-delay timer, which would not block the currently executing code.

-Adam

_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to