From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/web/api/stylesheet/ownernode/index.html | 46 ++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 files/ja/web/api/stylesheet/ownernode/index.html (limited to 'files/ja/web/api/stylesheet/ownernode/index.html') diff --git a/files/ja/web/api/stylesheet/ownernode/index.html b/files/ja/web/api/stylesheet/ownernode/index.html new file mode 100644 index 0000000000..a25e664749 --- /dev/null +++ b/files/ja/web/api/stylesheet/ownernode/index.html @@ -0,0 +1,46 @@ +--- +title: StyleSheet.ownerNode +slug: Web/API/StyleSheet/ownerNode +tags: + - API + - CSSOM + - Property + - Reference +translation_of: Web/API/StyleSheet/ownerNode +--- +
{{APIRef("CSSOM")}}
+ +

概要

+ +

ownerNode は、このスタイルシートを document と関連付けているノードを返します。

+ +

構文

+ +
objRef = stylesheet.ownerNode
+
+ +

+ +
<html>
+ <head>
+  <link rel="StyleSheet" href="example.css" type="text/css" />
+  <script>
+   function stilo() {
+    alert(document.styleSheets[0].ownerNode);
+   }
+  </script>
+ </head>
+ <body>
+   <button onclick="stilo()">ss</button>
+ </body>
+</html>
+// displays "object HTMLLinkElement"
+
+ +

補記

+ +

HTML の場合、ownerNode は、相当する {{HTMLElement("link")}} 要素または {{HTMLElement("style")}} 要素になるでしょう。XML の場合、リンク処理命令になるでしょう。他のスタイルシートに含まれるスタイルシートの場合、この属性の値は NULL になります。

+ +

仕様書

+ +

DOM Level 2 Styles - STYLESHEET

-- cgit v1.2.3-54-g00ecf