I'm working on a custom WebKit port that converts HTML to a list of drawing operations (essentially each GraphicsContext call generates an entry on the list). The ultimate goal is an HTML-to-PDF converter. The second part of the project will convert the list of drawing operations to PDF.
This is all being done "headless", without any sort of GUI. One problem I'm running into is the event loop. Right now, my code loads a URL (FrameLoader::load()), and then goes into a loop to handle timer callbacks (which are set with WebCore::setSharedTimerFireInterval()). When loading is finished (FrameLoaderClient::dispatchDidFinishLoad()), the event loop exits. That works fine for basic stuff, but doesn't handle asynchronous JavaScript (e.g., if JavaScript code is waiting on a timer, or for WebSocket data, etc.) at all. Is there a good way to handle this? I have the possibility of adding some JavaScript code to emit some sort of "finished" signal (as long as the code can still run in a regular browser). What would be the easiest way to pick up that signal from the WebKit side? I haven't really looked into the JSC code very much yet. (If this post would be more appropriate on webkit-dev, please let me know.) - Derek _______________________________________________ webkit-help mailing list webkit-help@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-help