Highlight: size プロパティ
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
値
size
の値は、ハイライトオブジェクトが持っている項目数を表す読み取り専用の整数です。
例
size の使用
js
const highlight = new Highlight();
highlight.add(range1);
highlight.add(range2);
highlight.add(range3);
console.log(highlight.size); // 3
仕様書
Specification |
---|
ECMAScript® 2026 Language Specification # sec-get-set.prototype.size |