shaoqun lin
shaoqun lin
有点奇怪`Array.prototype`的类型是数组,但是又跟`object`一样的写法和属性访问,而且`Array.prototype.length`为0,不知道这是怎么实现的
@wangcansunking 你试一下不重设构造函数c的原型的构造方法就知道,就是去掉`c.prototype.constructor = c;`,然后看看`cInstance instanceof a` 构造函数声明的时候就会有`prototype`属性,然后`prototype`上会有`constructor`方法,这个方法就是构造函数本身,但是你再`b.prototype = new a()`的时候修改了它,使得它变成了构造函数a,如果不重设,那么这时候通过构造函数b创建出来的实例就会出现继承紊乱,你会发现这个实例它同时是b和a的实例
页面预览可以用你提到的两种方式的结合体,即iframe+dom挂载的方式,通过iframe来隔离框架样式上的问题,用postMessage来通信就好了,用后台实时渲染还是太占资源了 之前也弄过一版,但是只能处理纯静态的页面,最终还是倒在动态数据交互上😂
@filipw01 But I don't see any migration guide about "default icon not support string type" on the chrome developer website.In the official examples, there are also default icons that use...