FeiLin检测点


// FeiLin 的逻辑(简化):
var el = document.createElement('div');
document.body.appendChild(el);

// 设置一个新 CSS 属性
el.style.offsetPath = "none";

// 然后从 computed style 读回来
var cs = getComputedStyle(el);
var result = cs.offsetPath;    // 期望 "none"

// 如果引擎不支持 → cs.offsetPath 是 undefined 或 ""
// → round-trip 失败 → combat 对应位 = 0
CSS.supports("view-transition-name", "none")
// Chrome 111+ → true
// 不认识这个属性 → false → combat 位 = 0


"offsetPath" in CSSStyleDeclaration.prototype
// Chrome: true (反射属性在 prototype 上)
// 不支持: false
// FeiLin 的检测逻辑(简化):
el.style.cursor = "pointer";          // 在 inline style 上设一个非默认值
var cs = getComputedStyle(el);
cs.cursor === "pointer"               // 期望: computed 能读回 inline 设的值
// 引擎如果 getComputedStyle 返回空对象/auto → round-trip 失败


el.style.hyphenateCharacter = "auto";
var cs = getComputedStyle(el);
cs.hyphenateCharacter === "auto"      // Chrome 106+: "auto"
                                      // 老引擎: undefined / ""


typeof FontFaceSet                              // 期望 "function"
document.fonts.constructor.name                  // 期望 "FontFaceSet"
document.fonts instanceof FontFaceSet           // 期望 true
Object.getPrototypeOf(FontFaceSet.prototype)
  === EventTarget.prototype                     // 期望 true
FontFaceSet.toString()                           // 期望含 "native code"

posted @ 2026-09-01 16:22  AngDH  阅读(3)  评论(0)    收藏  举报