Mercurial > dwindows
comparison mac/dw.m @ 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 | b1838dd5509a |
children | 3f265cd5b069 |
comparison
equal
deleted
inserted
replaced
2019:583c2d62845c | 2020:59dfb86fb3b1 |
---|---|
8811 { | 8811 { |
8812 DWWebView *html = handle; | 8812 DWWebView *html = handle; |
8813 DW_LOCAL_POOL_IN; | 8813 DW_LOCAL_POOL_IN; |
8814 | 8814 |
8815 #if WK_API_ENABLED | 8815 #if WK_API_ENABLED |
8816 [html evaluateJavaScript:[NSString stringWithUTF8String:script] completionHandler:nil]; | 8816 [html evaluateJavaScript:[NSString stringWithUTF8String:script] completionHandler:^(NSString *result, NSError *error) |
8817 { | |
8818 void *params[2] = { result, scriptdata }; | |
8819 _event_handler(html, (NSEvent *)params, 18); | |
8820 }]; | |
8817 #else | 8821 #else |
8818 NSString *result = [html stringByEvaluatingJavaScriptFromString:[NSString stringWithUTF8String:script]]; | 8822 NSString *result = [html stringByEvaluatingJavaScriptFromString:[NSString stringWithUTF8String:script]]; |
8819 _event_handler(html, (NSEvent *)result, 18); | 8823 void *params[2] = { result, scriptdata }; |
8824 _event_handler(html, (NSEvent *)params, 18); | |
8820 #endif | 8825 #endif |
8821 DW_LOCAL_POOL_OUT; | 8826 DW_LOCAL_POOL_OUT; |
8822 return DW_ERROR_NONE; | 8827 return DW_ERROR_NONE; |
8823 } | 8828 } |
8824 | 8829 |