Share via

window.open() behaves differently on task pane add-in on Mac Excel client

Anonymous
2016-09-02T06:09:25+00:00

I'm developing a task pane add-in for Excel.  On the home page of the add-in, I use window.open() to open a child browser window for the user to login a 3rd party service and get oauth token to authenticate later calls to the 3rd party web service.  On Excel for Windows, iPad, and Excel Online, it behaves consistently so that in the child window, when I store some flags in the window.localStorage, the parent window gets it.  However, on Excel for Mac, instead of opening a child browser window, it opens a new tab on the existing full browser.  At the end of the login session, when it stores some flag in the window.localStorage, the parent page (i.e., add-in's home page running inside Excel for Mac) can't get it.  I guess this is because the browser hosting the add-in inside Excel for Mac and the full browser window.open() opens the 3rd party login page are different processes and they don't share the same localStorage.  I tried using window.postMessage() to communicate between the 2 windows and it doesn't work either.

Why window.open() behaves differently on Excel for Mac comparing to other platforms?  Could someone recommend a workaround?  Thanks!

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Jim G 134K Reputation points MVP Volunteer Moderator
2016-09-03T15:42:38+00:00

To the best of my knowledge it should work the same.

Use the Smile button in Excel to send a frown and describe the issue. Be sure to include your contact information in case someone from the Excel team wants to contact you about it.

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Jim G 134K Reputation points MVP Volunteer Moderator
    2016-09-05T15:34:12+00:00

    There is a forum dedicated to Javascript development in Microsoft Office. You might consider also posting your question there:

    http://stackoverflow.com/questions/tagged/office-js

    Was this answer helpful?

    0 comments No comments