Skip to content

Commit 96eedc6

Browse files
committed
Clicking the JS button in the demo felt very slow. Send the message right away ontouchstart instead. Not the correct UX, but I want to avoid the impression that passing messages is slow
1 parent d53c8d2 commit 96eedc6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

WebViewJavascriptBridge/ExampleAppDelegate.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ - (void)loadExamplePage {
5757
" WebViewJavascriptBridge.sendMessage('hello from the JS');"
5858
" var button = document.body.appendChild(document.createElement('button'));"
5959
" button.innerHTML = 'Click me to send a message to ObjC';"
60-
" button.onclick = function() { WebViewJavascriptBridge.sendMessage('hello from JS button'); };"
60+
" button.onclick = button.ontouchstart = function() { WebViewJavascriptBridge.sendMessage('hello from JS button'); };"
6161
" }"
6262
" </script>"
6363
"</body></html>" baseURL:nil];

0 commit comments

Comments
 (0)