Problems with window.open when page sets document.domain
(domain suffix) and try testcases.
Setting document.domain affects window.open() calls.
TC opens window and uses document.write() to write word to document.
Now for the tests...
- Test window.open("", "_blank", "width=300,height=300")
- Test window.open("about:blank", "_blank", "width=300,height=300")
- Test window.open("data:text/html,%3C!doctype%20html%3E", "_blank", "width=300,height=300")
- Test window.open("about:blank", "_blank", "width=300,height=300") USING doc.documentElement.innerHTML instead of doc.write()
Expected results: All testcases should show PASSED on green background.
What happens: When document.domain is set to myopera.com:
- First one works but it does not behave same as Second which is a bug because empty first parameter should assume "about:blank" (thanks aleto for pointing this out)
- Rest does not work (shows Error:, name: Error, message: Security violation or similar in Error Console upon calling doc.write())
Refresh page and try also without setting document.domain - all work.