XMLSerializer object detection IE8 and modern browsers - Javascript Language Basics

Javascript examples for Language Basics:XMLSerializer

Description

XMLSerializer object detection IE8 and modern browsers

Demo Code

ResultView the demo in separate window

<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>

Related Tutorials