Creating subclass of HTMLDivElement - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Div


Creating subclass of HTMLDivElement

Demo Code

ResultView the demo in separate window

      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">
    window.onload=function(){//  w  ww.j av a  2 s. c  om

    function subC() {
    subC.prototype = document.createElement('div');
    var x = new subC();
    console.log(x instanceof HTMLDivElement);



Related Tutorials