2023 第 39 周
9/26/2023, 2:58:00 AM 3 min read
-
10 块钱的 🥮,性价比太低了
-
margin-left/margin-right: auto;默认宽度: 100%固定宽度: 12rem使用内容(w-fit)撑开宽度
-
App 在发新版本(semantic version: Major, minor, patch)时, 内置一个新地址(域名/version/路径/),nginx 根据 domain/version/path 转发到不同服务下
-
So you have to trust that the dots will somehow connect in your future.
-
VSCode 内置 PORTS. ps: 近几年来大家是在内网跑测试,这几次在外网,forward 很方便 - Ref
-
阿里云滑块验证,在第二次使用时,需要把用实例 reset 一下
-
$0.querySelectorAll(':scope > li')
- Ref -
@container,
@container <container-condition> {}
同 @media 功能类似,只是 @media 相对于 viewport;- container: container-name / container-type
- container-name
- container-type
- 其他:length, CSS.*
- ps: 定义 @container 后,使用 container: name/type 来约束规则范围
-
去完成各式各样的体验
-
建设太快了,需要等一等他的人民 Ref
-
有可行性模型来支撑 action
-
var checkIfInstanceOf = function (obj, classFunction) { if (obj == null || classFunction == null) return false; let proto = Object.getPrototypeOf(obj); // .__proto__ while (proto) { if (proto.constructor == classFunction) return true; proto = Object.getPrototypeOf(proto); } return false; }; // bad case. function B() {} const BoundB = B.bind(null); checkIfInstanceOf(new B(), BoundB); // false.
- object instanceof constructor 判定 constructor.prototype 是否在 object 的原型链上
- 可以使用 Symbol.hasInstance 来定义 instanceof 行为
- 函数(哪怕构造函数)可以调用 bind 生成新函数,但新函数没有 prototype 对象,也就不能使用 extends 关键字用作父类;但新函数仍然可以被 new 调用(也就是作为构造函数),忽略作为(this)的第一个参数,构造函数(new.target)依然是原函数
- 更新 prototype 的方法: Object.setPrototypeOf; Object.create; Object.assign; 直接重写
X.prototype = {}
; - super, Object.hasOwn 代替 Object.prototype.hasOwnProperty
- Object_prototypes
- Tag:
- 2023