lishihong
lishihong
但是注意:使用以下这种写法却会报错: (() => { console.log(1) }()) 为什么会报错呢?嘿嘿,如果你知道,可以告诉我~ 等价于这样子的: (function f(){console.log(1)}()) function f(){ console.log(1) }()
> 大佬们,这一句什么情况会执行到啊?`new Child()` 之后肯定有 `this` 呀 > > ```js > if (!self) { > throw new ReferenceError("this hasn't been initialised - super() hasn't been called") > } > ``` 应该是子类的构造方法里面没有使用super不能使用this
> ```js > function addEvent (type, el, fn) { > if (window.addEventListener) { > addEvent = function (type, el, fn) { > el.addEventListener(type, fn, false); > } > } >...
> @lishihong addEvent经过条件判定后已经被重写了 哦 是啊 明白了

router.matcher = createRouter().matcher 无效