Javascript examples for Language Basics:XMLSerializer
XMLSerializer object detection IE8 and modern browsers
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=( function() {// w w w . j av a 2 s. co m if (window.XMLSerializer) { console.log('detected XMLSerializer on window'); } else if (typeof window.XMLSerializer !== 'undefined') { console.log('detected XMLSerializer using typeof'); } else { console.log('no has XMLSerializer.'); } }); </script> </head> <body> </body> </html>