2023 第 39 周

发布:
  • 10 块钱的 🥮,性价比太低了

  • Nuxt 做各种小优化,把基础的功能优化废了 - Ref/issue ps: 当然这类静态资源应当放到 cdn 上。

  • 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 ps: 和嵌套写法时,& 代替 parent selector 类似,但

    , 而 & 同
    ;

  • @container, @container <container-condition> {} 同 @media 功能类似,只是 @media 相对于 viewport;

  • why-bundle-for-production

  • 去完成各式各样的体验

  • 建设太快了,需要等一等他的人民 Ref

  • 社会舆论不断催生新法律…

  • 40 岁以上中年人失业都干嘛去了?

  • 有可行性模型来支撑 action

  • Nobody cares about your blog

  • The good line-height

  • Ref

    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.
    1. object instanceof constructor 判定 constructor.prototype 是否在 object 的原型链上
    2. 可以使用 Symbol.hasInstance 来定义 instanceof 行为
    3. 函数 (哪怕构造函数) 可以调用 bind 生成新函数,但新函数没有 prototype 对象,也就不能使用 extends 关键字用作父类;但新函数仍然可以被 new 调用 (也就是作为构造函数),忽略作为 (this) 的第一个参数,构造函数 (new.target) 依然是原函数
    4. 更新 prototype 的方法:Object.setPrototypeOf; Object.create; Object.assign; 直接重写 X.prototype = {};
    5. super, Object.hasOwn 代替 Object.prototype.hasOwnProperty
    6. Object_prototypes