Closed jrop closed 6 years ago
Furthermore if I add this code in the dialog:
// in dialog:
window.addEventListener('message', console.log(JSON.parse(e.data)))
And this in the task pane:
dialog.sendMessage(JSON.stringify({hello: 'World'}))
Then I see this logged in the console:
{
_messageType: 1,
_actionName: "executeMethod",
_conversationId: "-bd8cd38_-70e7ac05_1527164401310",
_correlationId: 5,
_origin: "...",
_data: { Error: 5000, Version: 1 },
_errorCode: 0,
_responseType: 0,
_serializerVersion: 1
}
@jrop I will investigate, but I'm 99% sure that there really isn't such a method on that object, or there is but it's intended for internal use only by Microsoft, or its something that will eventually be previewed. Are you using the beta Office JavaScript library? What is the URL of the CDN that you are calling it from?
@Rick-Kirkham Thanks for the info. I am including from this URL:
https://appsforoffice.microsoft.com/lib/1/hosted/Office.js
@jrop Yes. I found it too. It's definitely there. The question is whether we support its use. I'm investigating.
@jrop This method is only supported in OneNote. I will add it to the documentation.
@Rick-Kirkham Thanks for the info
@jrop Lastest word is that we do not support its use even in OneNote. It is "For internal use only".
@Rick-Kirkham I appreciate you looking into this for me. Thank you for the detailed and timely information
The method
DialogHandler.sendMessage
is not documented.Article URL
https://dev.office.com/reference/add-ins/shared/officeui.dialog
Issue
Hello. When I execute the following code, I notice that
dialog
posseses an undocumented function:As you can see at the above documentation link, only the following methods on Dialog are documented:
It would be good to have documentation for
sendMessage
as well, and also how to add handlers from within the child dialog to receive messages from the parent.Thanks!