support for injecting js before opening new window