react-new-window
react-new-window copied to clipboard
Window features are ignored
I can't find any way to set window features. I submit an object as the features property, and none of the mappings in that object are set as window features. That includes numeric values, like left or top, and boolean values like titlebar or scrollbars (I tried a boolean value and also string "yes/no"). I also tried setting the name property to "_blank" or leaving it out, since the JS API says strWindowFeatures will be ignored if opening an existing window. No matter what I do, all window features are ignored. EDIT: I found that width and height features are respected. But no others AFAICT.
Same here. Great library with little tweaks
Same here. Do you have an issue ?
So this issue likely because most modern browsers override window features by default (due to potential security risks), not an issue with the library.
Thanks for your reply. In that case, there is at least an issue with the library's API, correct? I was trying to do what the API said I could do, and it was silently ignored. If most modern browsers override this behavior, then perhaps it should be removed from the API. Or at least a note should be added saying that this will not work on most browsers.
I agree completely. At the least, a note in the docs should be included to make users aware of likely compatibility issues. I think there could still some cases where Window features are usable; like native applications running browser engines (stuff like Electron app). Even then, I'd think there are better options.
Will improve the docs with all your suggestion. Thank you all for the valuable discussion. Also, I apologize for the long reply.