Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can child be opened up in same tab i.e. iframe? #14

Open
mmatho opened this issue May 8, 2018 · 4 comments
Open

Can child be opened up in same tab i.e. iframe? #14

mmatho opened this issue May 8, 2018 · 4 comments

Comments

@mmatho
Copy link

mmatho commented May 8, 2018

I am looking at the documentation and wondering if there is a way I can open child tab in the same window as parent. Is it possible?

@softvar
Copy link
Member

softvar commented May 8, 2018

Yes, by default it opens in the same window only i.e. as a tab (which is why across-tabs :) ).

var config = {
  url: 'child.html',
  windowName: 'child-tab-' + i++,
  windowFeatures: ''
};
parent.openNewTab(config);

Check the online demo here - https://engineering.wingify.com/across-tabs/live-demo.html
Or, clone the repo, npm install, and navigate to example folder, run two local servers(one for parent and other for child) and you can play with it.

Let me know if you face any issues regarding this.

@softvar softvar closed this as completed May 8, 2018
@mmatho
Copy link
Author

mmatho commented May 8, 2018

Is it possible to open child in same tab as parent?

@softvar
Copy link
Member

softvar commented May 9, 2018

@mmatho Oh, I got it. You need an iframe to be get opened via across-tabs, right?
The current behavior of across-tabs always opens a new tab.

I'll find out a way to use it with iframe(child) within the Parent window.

Thanks for reporting this.

@softvar softvar reopened this May 9, 2018
@softvar softvar changed the title How to open child in same window? Can child be open in same tab i.e. iframe? May 9, 2018
@softvar softvar changed the title Can child be open in same tab i.e. iframe? Can child be opened up in same tab i.e. iframe? May 9, 2018
@NicHaley
Copy link

NicHaley commented Jul 5, 2019

@softvar I would love this feature as well! I have a situation where I would like to open the child in a new tab on mobile, but open within an iframe on desktop. While across-tabs is great for the mobile case, it would be great if I could use it with iFrames as well to have a consistent messaging API.

Do you have an ETA on this feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants