Maulik Kotadiya
Maulik Kotadiya

Reputation: 15

office.js DialogAPI with messageChild method

Currently dialogAPI has messageParent method that will allow only child window to communicate with parent(Task-pane). Is there any scope for messageChild method in future that can pass some data/message to child window without closing it?

Currently we are relying on javascript's window objects method for communication between two windows

Upvotes: 1

Views: 553

Answers (1)

Rick Kirkham
Rick Kirkham

Reputation: 9684

You can send messages from the parent window to the child window in at least 2 ways:

  1. Pass it as a query parameter on the URL that you pass to displayDialogAsync.
  2. Store the information in localStorage with script on the parent page and have script in the child page read it.

If you have a suggestion for a new API, please go to Office Developer User Voice. Thanks!

Upvotes: 2

Related Questions