PilotGaea 2D O'view
    正在準備搜尋索引...

    函數 inherits

    • 函數

      Inherit the prototype methods from one constructor into another.

      Usage:

      function ParentClass(a, b) { }
      ParentClass.prototype.foo = function(a) { }
      
      function ChildClass(a, b, c) {
        // Call parent constructor
        ParentClass.call(this, a, b);
      }
      ol.inherits(ChildClass, ParentClass);
      
      var child = new ChildClass('a', 'b', 'see');
      child.foo(); // This works.
      

      參數

      • childCtor: () => any

        Child constructor.

      • parentCtor: () => any

        Parent constructor.

      回傳 void