LayoutShiftAttribution: node-Eigenschaft
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimentell: Dies ist eine experimentelle Technologie
Überprüfen Sie die Browser-Kompatibilitätstabelle sorgfältig vor der Verwendung auf produktiven Webseiten.
Die schreibgeschützte node
-Eigenschaft des LayoutShiftAttribution
-Interfaces gibt ein Node
-Objekt zurück, das das verschobene Objekt darstellt.
Wert
Ein Node
.
Beispiele
Im folgenden Beispiel wird das node
des ersten Elements in LayoutShift.sources
in die Konsole ausgegeben.
new PerformanceObserver((list) => {
for (const { sources } of list.getEntries()) {
if (sources) {
console.log(sources[0].node);
}
}
}).observe({ type: "layout-shift", buffered: true });
Spezifikationen
Specification |
---|
Layout Instability API # dom-layoutshiftattribution-node |
Browser-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
node |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- Experimental. Expect behavior to change in the future.