Mercurial > dwindows
changeset 2020:59dfb86fb3b1
Mac: Implemented DW_SIGNAL_HTML_RESULT for all versions.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Fri, 08 Nov 2019 13:06:47 +0000 |
parents | 583c2d62845c |
children | 0cce5fed4594 |
files | mac/dw.m |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mac/dw.m Fri Nov 08 12:37:37 2019 +0000 +++ b/mac/dw.m Fri Nov 08 13:06:47 2019 +0000 @@ -8813,10 +8813,15 @@ DW_LOCAL_POOL_IN; #if WK_API_ENABLED - [html evaluateJavaScript:[NSString stringWithUTF8String:script] completionHandler:nil]; + [html evaluateJavaScript:[NSString stringWithUTF8String:script] completionHandler:^(NSString *result, NSError *error) + { + void *params[2] = { result, scriptdata }; + _event_handler(html, (NSEvent *)params, 18); + }]; #else NSString *result = [html stringByEvaluatingJavaScriptFromString:[NSString stringWithUTF8String:script]]; - _event_handler(html, (NSEvent *)result, 18); + void *params[2] = { result, scriptdata }; + _event_handler(html, (NSEvent *)params, 18); #endif DW_LOCAL_POOL_OUT; return DW_ERROR_NONE;