Sending A Message From C++ To Javascript
is there an example in which a message from c++ sent like dom->sendMessage('something') , is used inside a javascript? thank you, daniele
Solution 1:
The html-overlay example is what you're looking for. Here is a more detailed answer about how to get those messages in JavaScript.
Note that the Minko AbstractDOMElement
implementation "should" give you all the DOM methods you need to interact with any DOM element directly in C++ without JS. Including (but not limited to):
AbstractDOMElement::value()
AbstractDOMElement::textContent()
AbstractDOMElement::innerHTML()
AbstractDOMElement::setAttribute()
Using those methods your C++ code can easily "change" the HTML5 UI components just as you would in pure JS (since it's the same DOM API).
Now if you want some JS code to be "notified", your JS code can:
- listen to the actual correspoding DOM events;
- listen to a custom message you'll have to send from the C++ code.
Post a Comment for "Sending A Message From C++ To Javascript"