简体   繁体   中英

Alternative to window.open

My question is to find an alternative for the window.open() command because it is being blocked by the ad-blocker because in my webpage it is supposed to automatically open a new window with only 1 tab. I tried the command

document.open()

with a length and width dimension to force it to open in a new window not in just as a new tab...

and it worked for me by opening a new window with only 1 tab.

I am not sure whether this just works on my device or if this is an accepted alternative.

My reasoning is that since in DOM, window is the highest level of hierarchy, typing document.open would be just as effective as window.open since document is a child node of window.

Can anybody share if this will work on other devices on major browsers like Chrome Firefox IE...?

Also is my reasoning correct?

Thanks guys!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM