--- title: Document.lastStyleSheetSet slug: Web/API/Document/lastStyleSheetSet tags: - API - CSSOM - DOM - Document - Property - Reference - Stylesheets - lastStyleSheetSet translation_of: Web/API/Document/lastStyleSheetSet ---
Document.lastStyleSheetSet プロパティは、最後に有効化されたスタイルシートセットを返します。このプロパティの値は {{domxref("document.selectedStyleSheetSet")}} プロパティが変化するたびに変化します。
var lastStyleSheetSet = document.lastStyleSheetSet
返値である lastStyleSheetSet は、最も新しく設定されたスタイルシートセットを示します。現在のスタイルシートセットが {{domxref("document.selectedStyleSheetSet")}} を設定することで変更されたものでない場合、返値は null になります。
let lastSheetSet = document.lastStyleSheetSet;
if (!lastSheetSet) {
lastSheetSet = 'Style sheet not yet changed';
}
else {
console.log('The last style sheet set is: ' + lastSheetSet);
}
{{Compat("api.Document.lastStyleSheetSet")}}