kl404

Results comments of kl404

function myNew(Constructor, ...args) { // 1. 创建一个新对象,并将其原型指向构造函数的prototype const obj = Object.create(Constructor.prototype); // 2. 执行构造函数,并将this指向新对象 const result = Constructor.apply(obj, args); // 3. 如果构造函数返回了一个对象,则返回该对象;否则返回新创建的对象 return result instanceof Object ? result : obj;...

盒子、容器、元素那里讲的好乱呀