Prevent content to load in iframe if the content is popped out

Arun A 51 Reputation points
2022-01-20T07:11:12.89+00:00

We have a created a new tab app which can be launched from the app bar. When this app is popped out and then the user navigates in teams and comes back to the app, I want to prevent loading the app in the iframe as the app is already in popped out window. Can we achieve this with the sdk? Any pointers will be helpful?

Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
2,866 questions
{count} votes

Accepted answer
  1. Prasad-MSFT 5,621 Reputation points Microsoft Vendor
    2022-01-21T09:43:14.23+00:00

    @Arun A - You can get the indication whether the tab is in a pop out window using the Microsoft Teams JavaScript client SDK by calling microsoftTeams.getContext(function(context) as mentioned in this doc: Get context by using the Microsoft Teams JavaScript library
    But there is no way to prevent loading the app in the iframe if the app is already in popped out window with help off any SDK.

    Thanks,
    Prasad Das


    If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate

    0 comments No comments

0 additional answers

Sort by: Most helpful