Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

The Window and Document objects are core Javascript features and can be expected in all circumstances, but which methods are supported?

0
Posted

The Window and Document objects are core Javascript features and can be expected in all circumstances, but which methods are supported?

0

var fbtext = “Feedback text”; var fbwin; if((window.focus)&& (document.open)&& (document.write)&& (document.close)){ // All necessary methods exist fbwin = window.open(”, ‘Feedback’, ‘width=410, height=200, menubar=no, status=no, toolbar=no, resizable=no’); fbwin.document.open(); fbwin.document.write(fbtext); fbwin.document.close(); fbwin.focus(); } else{ // Some critical methods don’t exist, // use a standard alert instead alert(fbtext); }

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123