Displays a web page or html/javascript content directly embedded into a panel of Usine.
Url of the web page to display (optional).
comma-text of the html/javascript source code to display (if the url is empty).
Message received from the panel. Usine will create a bridge To send a message from the page to Usine use the sendUsine('myMessage')
.
The sendUsine function is define by:
var sendUsine = function(parameters) {
var v = parameters;
// MACOS
if (!window.webkit || !window.webkit.messageHandlers || !window.webkit.messageHandlers.Usine) {
return;
}
window.webkit.messageHandlers.Usine.postMessage(v);
// WINDOWS
if (!window.chrome || !window.chrome.webview || !window.chrome.webview.hostObjects || !window.chrome.webview.hostObjects.sync) {
return;
}
var obj = window.chrome.webview.hostObjects.sync.Usine;
if (obj) {
obj.ObjectMessage = v;
}
//LINUX
if (!window.webkit || !window.webkit.messageHandlers || !window.webkit.messageHandlers.Usine) {
return;
}
window.webkit.messageHandlers.Usine.postMessage(v);
};
Example for a button:
<button onclick=sendUsine('{name:"Bob",email:"bob32@gmail.com"}');>Bob</button>
the message mustn't contain any space char.
Sends 1 value when a message above is received.
Javascript to execute into the page. ie. document.getElementById("idexample").innerHTML = Math.random()
;
can be used to modify the content of the page from Usine.
Executes the javascript above.
The execution is asynchronous.
Determines where the object is visible.
When the location is set to a container which doesn't exist in the patch, Usine try to find in parent patches, the first container available. If no container is available an error message is displayed.
Sets the control as an additional container so any other control can be placed into that container. The additional container is identified by a number.
a button inside a listbox
When ON, will also be visible in the interface-builder-panel.
version 6.0.240115
Edit All Pages