...
where resultMessage: if specified, the a message with this name is posted to the iframe parent when command execution is done
and messageId: if specified, it is passed to the resultMessage
Code Block |
---|
varconst message = { messageName: "runcommand", commandString: "_YourCommand", resultMessage: "nameOfPostedResultMessage", //optional messageId: "messageId" ;//optional } windowconst iframe = document.getElementById("cadcontent"); iframe.contentWindow.postMessage(message, '*'); |
...
Expand | ||
---|---|---|
| ||
|
...
where resultMessage: if specified, a message with this name is posted to iframe parent when lisp execution is done
and messageId: if specified, it is passed to the resultMessage
Code Block | ||
---|---|---|
| ||
varconst message = { messageName: "runlisp", lispExpression: "lispExpression", resultMessage: "nameOfPostedResultMessage", //optional messageId: "messageId"; //optional } window const iframe = document.getElementById("cadcontent"); iframe.contentWindow.postMessage(message, '*'); |
...
where eventName will be the event type which you want to register:
Code Block | ||
---|---|---|
| ||
varconst message = { messageName: "eventRegister", eventName: "commandEvent";//one of the above event types } windowconst iframe = document.getElementById("cadcontent"); iframe.contentWindow.postMessage(message, '*'); |
...
where eventName will be the event type which you want to deregister:
Code Block | ||
---|---|---|
| ||
varconst message = { messageName: "eventDeRegister", eventName: "commandEvent";//one of the above event types } window const iframe = document.getElementById("cadcontent"); iframe.contentWindow.postMessage(message, '*'); |
...
where state can be “view” or “edit”
Code Block | ||
---|---|---|
| ||
varconst message={ messageName= “stateChanged”, state = “view”; } windowconst iframe = document.getElementById("cadcontent"); iframe.contentWindow.postMessage(message, '*'); |
...