On May 2, 2011, at 6:00 AM, [email protected] wrote:
> To have alert working, you need to implement WebUIDelegateMBS subclass and 
> add code to the RunJavaScriptAlertPanelWithMessage event.


OK, that makes sense.


>> document.getElementsByTagName
>> document.getElementById
>> document.getElementByName
> 
> in the webview.rbp example project I added a button with this code:
> 
> MsgBox n.EvaluateJavaScript("document.getElementsByTagName('div').length")
> 
> it shows 19 for me, so this function works. And I believe the others work 
> too. The plugin only implements the call to javascript engine and has no 
> influence on what the engine can do.


OK, I was able to get that to work, too.



>> Also, does this method need to be update for HTML5?
> 
> No. 


Well, apparently there is a problem with javascript + WebViewMBS when using the 
<audio> and <video> tags of HTML5. I can't get any of the following working for 
those tags:

document.getElementsByTagName
document.getElementById
document.getElementByName

There are many scripts online including Apple's own script, which uses these 
get methods and which work in Safari:
<http://developer.apple.com/library/safari/#documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/ControllingMediaWithJavaScript/ControllingMediaWithJavaScript.html>

but the javascript sent to WebViewMBS doesn't return the object. 

Thanks,
Aaron


_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to