构造函数相关错误

Tags
javascript
Created
Mar 16, 2018 5:21 AM

new HTMLDocument => Uncaught TypeError: Illegal constructor

HTMLDocument 被设计成(抽象)接口,无法进行实例化操作

TypeError: Illegal constructor.

直接在函数体中抛出

TypeError: a is not a constructor

function 定义的函数都是构造函数,箭头函数有作用域的问题

一些全局对象都不是构造函数

Generator functions cannot be used as constructors either.

SuperMade with Super