Add check for document.write existence to prevent NPEs causing crashes in goog.window.open. Implementing this in since window there's already similar logic here (and document.write failing unexpectedly across the board seems riskier). RELNOTES: n/a
Add check for document.write existence to prevent NPEs causing crashes in goog.window.open. Implementing this in since window there's already similar logic here (and document.write failing unexpectedly across the board seems riskier).
RELNOTES: n/a

PiperOrigin-RevId: 333571150

google/closure-library,google/closure-library,google/closure-library,google/closure-library,google/closure-library