I am loading a page in a webview. There is this little test Javascript on the page:
<script type="text/javascript"> function test(parametr) { $('#testspan').html(parametr); } var bdu = (function(){ return { secondtest: function(parametr) { $('#testspan').html(parametr); } } })(); </script>
The problem is that I cannot name the function "secondtest" from cocoa
this works fine:
[[webview1 windowScriptObject] callWebScriptMethod:@"test" withArguments:arguments];
and this does not work:
[[webview1 windowScriptObject] callWebScriptMethod:@"bdu.secondtest" withArguments:arguments];
What can cause this problem and how to fix it?
thanks
source share