Webkit question

Lets say I want to have Corona point a Webkit browser to a web page. That works, and the web page sends down HTML over HTTP, including other markup like Javascript.

Now I want it to also send custom LUA in some form, either embedded in the HTML (maybe it gets parse out of the page source), or sent somehow via Javascript to a receiver in the Corona app. In teh examples below, I am using [] due to forum formatting issues:

  1. Via HTML - in this case Corona intercepts the incoming HTML, parses it, and extracts the section labeled [corona]

[html]
[head]
[corona id=MySource]
– this is my happy corona source
myText = display.newText( “Hello, World!”, 10, 80, “MarkerFelt-Thin”, 60 )
myText:setTextColor( 255,180,90 )
[/corona]
[head]
[body]
This is my web content!
[/body]
[/html]

  1. Javascript ‘sends’ the code into Corona, probably using a DIV. Or perhaps Corona can be used to call whatever WebKit function to get the content of the DIV?

[html>
[body]
[div id=MySource]
– this is my happy corona source
myText = display.newText( “Hello, World!”, 10, 80, “MarkerFelt-Thin”, 60 )
myText:setTextColor( 255,180,90 )
[/div]
[script]
navigator.corona.send(document.getElementById(‘MySource’).innerHTML);
[/script]
[/body]
[/html]

[import]uid: 7547 topic_id: 1406 reply_id: 301406[/import]

You can’t do that because it is actively forbidden by the corona developers and Apple would not like it otherwise. [import]uid: 6928 topic_id: 1406 reply_id: 3895[/import]

Correct, doing so is forbidden by Apple SDK agreement.

Carlos [import]uid: 24 topic_id: 1406 reply_id: 4079[/import]