[webkit-dev] Calling JavaScript function from within DumpRenderTree

Chris Fleizach cfleizach at apple.com
Sat Jan 2 19:32:05 PST 2010


On Jan 2, 2010, at 1:34 AM, Maciej Stachowiak wrote:

> 
> On Jan 1, 2010, at 9:25 PM, Sam Weinig wrote:
> 
>> 
>> That said, a more javascripty way to do this would be to pass the function object to liveRegion.addNotificationListener itself.  That way, in the test file, you would have,
>> 
>> liveRegion.addNotificationListener(function(notification) {
>>   // do stuff with notification
>> });
>> 
>> In the implementation of addNotificationListener, you would save the function object off instead of saving off the string, and then call it in _accessibilityNotificationCallback.
> 
> I would recommend doing it this second way. Note that with this approach you can still declare the function up front, and just pass the name, but you wouldn't pass it with a string.
> 

I agree. I have it working with this method now. 

Thx
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20100102/a301a532/attachment.html>


More information about the webkit-dev mailing list