From 05b2650717b84d199f6ebd5df8a8f9d1e3b23f3f Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Tue, 23 Feb 2021 15:56:25 +0100 Subject: sync: move --- files/es/conflicting/web/api/element/index.html | 132 +++++++++++++ .../web/api/element/nextelementsibling/index.html | 113 +++++++++++ .../api/element/previouselementsibling/index.html | 160 +++++++++++++++ .../es/web/api/nondocumenttypechildnode/index.html | 132 ------------- .../nextelementsibling/index.html | 113 ----------- .../previouselementsibling/index.html | 160 --------------- .../web/accessibility/aria/widgets/index.html | 78 ++++++++ .../web/api/htmlhyperlinkelementutils/index.html | 214 +++++++++++++++++++++ .../accessibility/aria/widgets/overview/index.html | 78 -------- files/fr/web/api/document/activeelement/index.html | 26 +++ .../documentorshadowroot/activeelement/index.html | 26 --- .../web/api/htmlhyperlinkelementutils/index.html | 214 --------------------- .../web/api/htmlhyperlinkelementutils/index.html | 206 ++++++++++++++++++++ .../web/api/htmlhyperlinkelementutils/index.html | 206 -------------------- .../web/accessibility/aria/widgets/index.html | 72 +++++++ .../index.html | 69 +++++++ .../web/api/htmlhyperlinkelementutils/index.html | 88 +++++++++ .../accessibility/aria/widgets/overview/index.html | 72 ------- files/ja/web/api/document/activeelement/index.html | 145 ++++++++++++++ .../documentorshadowroot/activeelement/index.html | 145 -------------- files/ja/web/api/htmlanchorelement/hash/index.html | 60 ++++++ files/ja/web/api/htmlanchorelement/host/index.html | 65 +++++++ .../web/api/htmlanchorelement/hostname/index.html | 56 ++++++ files/ja/web/api/htmlanchorelement/href/index.html | 58 ++++++ .../ja/web/api/htmlanchorelement/origin/index.html | 64 ++++++ .../web/api/htmlanchorelement/password/index.html | 58 ++++++ .../web/api/htmlanchorelement/pathname/index.html | 57 ++++++ files/ja/web/api/htmlanchorelement/port/index.html | 57 ++++++ .../web/api/htmlanchorelement/protocol/index.html | 56 ++++++ .../ja/web/api/htmlanchorelement/search/index.html | 63 ++++++ .../web/api/htmlanchorelement/tostring/index.html | 39 ++++ .../web/api/htmlanchorelement/username/index.html | 57 ++++++ .../api/htmlhyperlinkelementutils/hash/index.html | 60 ------ .../api/htmlhyperlinkelementutils/host/index.html | 65 ------- .../htmlhyperlinkelementutils/hostname/index.html | 56 ------ .../api/htmlhyperlinkelementutils/href/index.html | 58 ------ .../web/api/htmlhyperlinkelementutils/index.html | 88 --------- .../htmlhyperlinkelementutils/origin/index.html | 64 ------ .../htmlhyperlinkelementutils/password/index.html | 58 ------ .../htmlhyperlinkelementutils/pathname/index.html | 57 ------ .../api/htmlhyperlinkelementutils/port/index.html | 57 ------ .../htmlhyperlinkelementutils/protocol/index.html | 56 ------ .../htmlhyperlinkelementutils/search/index.html | 63 ------ .../htmlhyperlinkelementutils/tostring/index.html | 39 ---- .../htmlhyperlinkelementutils/username/index.html | 57 ------ .../ja/web/api/nondocumenttypechildnode/index.html | 69 ------- .../web/api/htmlhyperlinkelementutils/index.html | 91 +++++++++ files/ko/web/api/document/activeelement/index.html | 94 +++++++++ .../documentorshadowroot/activeelement/index.html | 94 --------- files/ko/web/api/htmlanchorelement/href/index.html | 51 +++++ .../api/htmlhyperlinkelementutils/href/index.html | 51 ----- .../web/api/htmlhyperlinkelementutils/index.html | 91 --------- files/pl/web/api/document/activeelement/index.html | 28 +++ .../documentorshadowroot/activeelement/index.html | 28 --- .../web/accessibility/aria/widgets/index.html | 73 +++++++ .../accessibility/aria/widgets/overview/index.html | 73 ------- .../web/api/document/activeelement/index.html | 166 ++++++++++++++++ .../documentorshadowroot/activeelement/index.html | 166 ---------------- .../index.html | 132 +++++++++++++ .../web/api/htmlhyperlinkelementutils/index.html | 178 +++++++++++++++++ files/ru/web/api/document/activeelement/index.html | 166 ++++++++++++++++ .../documentorshadowroot/activeelement/index.html | 166 ---------------- .../web/api/element/nextelementsibling/index.html | 174 +++++++++++++++++ .../api/element/previouselementsibling/index.html | 185 ++++++++++++++++++ files/ru/web/api/htmlanchorelement/hash/index.html | 105 ++++++++++ files/ru/web/api/htmlanchorelement/host/index.html | 116 +++++++++++ .../web/api/htmlanchorelement/hostname/index.html | 105 ++++++++++ files/ru/web/api/htmlanchorelement/href/index.html | 108 +++++++++++ .../ru/web/api/htmlanchorelement/origin/index.html | 116 +++++++++++ .../web/api/htmlanchorelement/password/index.html | 106 ++++++++++ .../web/api/htmlanchorelement/pathname/index.html | 106 ++++++++++ files/ru/web/api/htmlanchorelement/port/index.html | 108 +++++++++++ .../web/api/htmlanchorelement/protocol/index.html | 106 ++++++++++ .../ru/web/api/htmlanchorelement/search/index.html | 106 ++++++++++ .../web/api/htmlanchorelement/tostring/index.html | 106 ++++++++++ .../web/api/htmlanchorelement/username/index.html | 104 ++++++++++ .../api/htmlhyperlinkelementutils/hash/index.html | 105 ---------- .../api/htmlhyperlinkelementutils/host/index.html | 116 ----------- .../htmlhyperlinkelementutils/hostname/index.html | 105 ---------- .../api/htmlhyperlinkelementutils/href/index.html | 108 ----------- .../web/api/htmlhyperlinkelementutils/index.html | 178 ----------------- .../htmlhyperlinkelementutils/origin/index.html | 116 ----------- .../htmlhyperlinkelementutils/password/index.html | 106 ---------- .../htmlhyperlinkelementutils/pathname/index.html | 106 ---------- .../api/htmlhyperlinkelementutils/port/index.html | 108 ----------- .../htmlhyperlinkelementutils/protocol/index.html | 106 ---------- .../htmlhyperlinkelementutils/search/index.html | 106 ---------- .../htmlhyperlinkelementutils/tostring/index.html | 106 ---------- .../htmlhyperlinkelementutils/username/index.html | 104 ---------- .../ru/web/api/nondocumenttypechildnode/index.html | 132 ------------- .../nextelementsibling/index.html | 174 ----------------- .../previouselementsibling/index.html | 185 ------------------ .../index.html | 69 +++++++ .../web/api/htmlhyperlinkelementutils/index.html | 84 ++++++++ .../web/api/document/activeelement/index.html | 86 +++++++++ .../documentorshadowroot/activeelement/index.html | 86 --------- .../web/api/element/nextelementsibling/index.html | 167 ++++++++++++++++ .../api/element/previouselementsibling/index.html | 118 ++++++++++++ .../web/api/htmlanchorelement/hash/index.html | 110 +++++++++++ .../web/api/htmlanchorelement/href/index.html | 109 +++++++++++ .../web/api/htmlanchorelement/origin/index.html | 117 +++++++++++ .../web/api/htmlanchorelement/password/index.html | 105 ++++++++++ .../web/api/htmlanchorelement/pathname/index.html | 111 +++++++++++ .../web/api/htmlanchorelement/search/index.html | 117 +++++++++++ .../web/api/htmlanchorelement/tostring/index.html | 111 +++++++++++ .../web/api/htmlanchorelement/username/index.html | 103 ++++++++++ .../api/htmlhyperlinkelementutils/hash/index.html | 110 ----------- .../api/htmlhyperlinkelementutils/href/index.html | 109 ----------- .../web/api/htmlhyperlinkelementutils/index.html | 84 -------- .../htmlhyperlinkelementutils/origin/index.html | 117 ----------- .../htmlhyperlinkelementutils/password/index.html | 105 ---------- .../htmlhyperlinkelementutils/pathname/index.html | 111 ----------- .../htmlhyperlinkelementutils/search/index.html | 117 ----------- .../htmlhyperlinkelementutils/tostring/index.html | 111 ----------- .../htmlhyperlinkelementutils/username/index.html | 103 ---------- .../web/api/nondocumenttypechildnode/index.html | 69 ------- .../nextelementsibling/index.html | 167 ---------------- .../previouselementsibling/index.html | 118 ------------ files/zh-tw/conflicting/web/api/element/index.html | 125 ++++++++++++ .../web/api/nondocumenttypechildnode/index.html | 125 ------------ 120 files changed, 6155 insertions(+), 6155 deletions(-) create mode 100644 files/es/conflicting/web/api/element/index.html create mode 100644 files/es/web/api/element/nextelementsibling/index.html create mode 100644 files/es/web/api/element/previouselementsibling/index.html delete mode 100644 files/es/web/api/nondocumenttypechildnode/index.html delete mode 100644 files/es/web/api/nondocumenttypechildnode/nextelementsibling/index.html delete mode 100644 files/es/web/api/nondocumenttypechildnode/previouselementsibling/index.html create mode 100644 files/fr/conflicting/web/accessibility/aria/widgets/index.html create mode 100644 files/fr/orphaned/web/api/htmlhyperlinkelementutils/index.html delete mode 100644 files/fr/web/accessibility/aria/widgets/overview/index.html create mode 100644 files/fr/web/api/document/activeelement/index.html delete mode 100644 files/fr/web/api/documentorshadowroot/activeelement/index.html delete mode 100644 files/fr/web/api/htmlhyperlinkelementutils/index.html create mode 100644 files/it/orphaned/web/api/htmlhyperlinkelementutils/index.html delete mode 100644 files/it/web/api/htmlhyperlinkelementutils/index.html create mode 100644 files/ja/conflicting/web/accessibility/aria/widgets/index.html create mode 100644 files/ja/conflicting/web/api/element_861159909c20acebf8e506c3bb0e2f7e/index.html create mode 100644 files/ja/orphaned/web/api/htmlhyperlinkelementutils/index.html delete mode 100644 files/ja/web/accessibility/aria/widgets/overview/index.html create mode 100644 files/ja/web/api/document/activeelement/index.html delete mode 100644 files/ja/web/api/documentorshadowroot/activeelement/index.html create mode 100644 files/ja/web/api/htmlanchorelement/hash/index.html create mode 100644 files/ja/web/api/htmlanchorelement/host/index.html create mode 100644 files/ja/web/api/htmlanchorelement/hostname/index.html create mode 100644 files/ja/web/api/htmlanchorelement/href/index.html create mode 100644 files/ja/web/api/htmlanchorelement/origin/index.html create mode 100644 files/ja/web/api/htmlanchorelement/password/index.html create mode 100644 files/ja/web/api/htmlanchorelement/pathname/index.html create mode 100644 files/ja/web/api/htmlanchorelement/port/index.html create mode 100644 files/ja/web/api/htmlanchorelement/protocol/index.html create mode 100644 files/ja/web/api/htmlanchorelement/search/index.html create mode 100644 files/ja/web/api/htmlanchorelement/tostring/index.html create mode 100644 files/ja/web/api/htmlanchorelement/username/index.html delete mode 100644 files/ja/web/api/htmlhyperlinkelementutils/hash/index.html delete mode 100644 files/ja/web/api/htmlhyperlinkelementutils/host/index.html delete mode 100644 files/ja/web/api/htmlhyperlinkelementutils/hostname/index.html delete mode 100644 files/ja/web/api/htmlhyperlinkelementutils/href/index.html delete mode 100644 files/ja/web/api/htmlhyperlinkelementutils/index.html delete mode 100644 files/ja/web/api/htmlhyperlinkelementutils/origin/index.html delete mode 100644 files/ja/web/api/htmlhyperlinkelementutils/password/index.html delete mode 100644 files/ja/web/api/htmlhyperlinkelementutils/pathname/index.html delete mode 100644 files/ja/web/api/htmlhyperlinkelementutils/port/index.html delete mode 100644 files/ja/web/api/htmlhyperlinkelementutils/protocol/index.html delete mode 100644 files/ja/web/api/htmlhyperlinkelementutils/search/index.html delete mode 100644 files/ja/web/api/htmlhyperlinkelementutils/tostring/index.html delete mode 100644 files/ja/web/api/htmlhyperlinkelementutils/username/index.html delete mode 100644 files/ja/web/api/nondocumenttypechildnode/index.html create mode 100644 files/ko/orphaned/web/api/htmlhyperlinkelementutils/index.html create mode 100644 files/ko/web/api/document/activeelement/index.html delete mode 100644 files/ko/web/api/documentorshadowroot/activeelement/index.html create mode 100644 files/ko/web/api/htmlanchorelement/href/index.html delete mode 100644 files/ko/web/api/htmlhyperlinkelementutils/href/index.html delete mode 100644 files/ko/web/api/htmlhyperlinkelementutils/index.html create mode 100644 files/pl/web/api/document/activeelement/index.html delete mode 100644 files/pl/web/api/documentorshadowroot/activeelement/index.html create mode 100644 files/pt-br/conflicting/web/accessibility/aria/widgets/index.html delete mode 100644 files/pt-br/web/accessibility/aria/widgets/overview/index.html create mode 100644 files/pt-br/web/api/document/activeelement/index.html delete mode 100644 files/pt-br/web/api/documentorshadowroot/activeelement/index.html create mode 100644 files/ru/conflicting/web/api/element_861159909c20acebf8e506c3bb0e2f7e/index.html create mode 100644 files/ru/orphaned/web/api/htmlhyperlinkelementutils/index.html create mode 100644 files/ru/web/api/document/activeelement/index.html delete mode 100644 files/ru/web/api/documentorshadowroot/activeelement/index.html create mode 100644 files/ru/web/api/element/nextelementsibling/index.html create mode 100644 files/ru/web/api/element/previouselementsibling/index.html create mode 100644 files/ru/web/api/htmlanchorelement/hash/index.html create mode 100644 files/ru/web/api/htmlanchorelement/host/index.html create mode 100644 files/ru/web/api/htmlanchorelement/hostname/index.html create mode 100644 files/ru/web/api/htmlanchorelement/href/index.html create mode 100644 files/ru/web/api/htmlanchorelement/origin/index.html create mode 100644 files/ru/web/api/htmlanchorelement/password/index.html create mode 100644 files/ru/web/api/htmlanchorelement/pathname/index.html create mode 100644 files/ru/web/api/htmlanchorelement/port/index.html create mode 100644 files/ru/web/api/htmlanchorelement/protocol/index.html create mode 100644 files/ru/web/api/htmlanchorelement/search/index.html create mode 100644 files/ru/web/api/htmlanchorelement/tostring/index.html create mode 100644 files/ru/web/api/htmlanchorelement/username/index.html delete mode 100644 files/ru/web/api/htmlhyperlinkelementutils/hash/index.html delete mode 100644 files/ru/web/api/htmlhyperlinkelementutils/host/index.html delete mode 100644 files/ru/web/api/htmlhyperlinkelementutils/hostname/index.html delete mode 100644 files/ru/web/api/htmlhyperlinkelementutils/href/index.html delete mode 100644 files/ru/web/api/htmlhyperlinkelementutils/index.html delete mode 100644 files/ru/web/api/htmlhyperlinkelementutils/origin/index.html delete mode 100644 files/ru/web/api/htmlhyperlinkelementutils/password/index.html delete mode 100644 files/ru/web/api/htmlhyperlinkelementutils/pathname/index.html delete mode 100644 files/ru/web/api/htmlhyperlinkelementutils/port/index.html delete mode 100644 files/ru/web/api/htmlhyperlinkelementutils/protocol/index.html delete mode 100644 files/ru/web/api/htmlhyperlinkelementutils/search/index.html delete mode 100644 files/ru/web/api/htmlhyperlinkelementutils/tostring/index.html delete mode 100644 files/ru/web/api/htmlhyperlinkelementutils/username/index.html delete mode 100644 files/ru/web/api/nondocumenttypechildnode/index.html delete mode 100644 files/ru/web/api/nondocumenttypechildnode/nextelementsibling/index.html delete mode 100644 files/ru/web/api/nondocumenttypechildnode/previouselementsibling/index.html create mode 100644 files/zh-cn/conflicting/web/api/element_861159909c20acebf8e506c3bb0e2f7e/index.html create mode 100644 files/zh-cn/orphaned/web/api/htmlhyperlinkelementutils/index.html create mode 100644 files/zh-cn/web/api/document/activeelement/index.html delete mode 100644 files/zh-cn/web/api/documentorshadowroot/activeelement/index.html create mode 100644 files/zh-cn/web/api/element/nextelementsibling/index.html create mode 100644 files/zh-cn/web/api/element/previouselementsibling/index.html create mode 100644 files/zh-cn/web/api/htmlanchorelement/hash/index.html create mode 100644 files/zh-cn/web/api/htmlanchorelement/href/index.html create mode 100644 files/zh-cn/web/api/htmlanchorelement/origin/index.html create mode 100644 files/zh-cn/web/api/htmlanchorelement/password/index.html create mode 100644 files/zh-cn/web/api/htmlanchorelement/pathname/index.html create mode 100644 files/zh-cn/web/api/htmlanchorelement/search/index.html create mode 100644 files/zh-cn/web/api/htmlanchorelement/tostring/index.html create mode 100644 files/zh-cn/web/api/htmlanchorelement/username/index.html delete mode 100644 files/zh-cn/web/api/htmlhyperlinkelementutils/hash/index.html delete mode 100644 files/zh-cn/web/api/htmlhyperlinkelementutils/href/index.html delete mode 100644 files/zh-cn/web/api/htmlhyperlinkelementutils/index.html delete mode 100644 files/zh-cn/web/api/htmlhyperlinkelementutils/origin/index.html delete mode 100644 files/zh-cn/web/api/htmlhyperlinkelementutils/password/index.html delete mode 100644 files/zh-cn/web/api/htmlhyperlinkelementutils/pathname/index.html delete mode 100644 files/zh-cn/web/api/htmlhyperlinkelementutils/search/index.html delete mode 100644 files/zh-cn/web/api/htmlhyperlinkelementutils/tostring/index.html delete mode 100644 files/zh-cn/web/api/htmlhyperlinkelementutils/username/index.html delete mode 100644 files/zh-cn/web/api/nondocumenttypechildnode/index.html delete mode 100644 files/zh-cn/web/api/nondocumenttypechildnode/nextelementsibling/index.html delete mode 100644 files/zh-cn/web/api/nondocumenttypechildnode/previouselementsibling/index.html create mode 100644 files/zh-tw/conflicting/web/api/element/index.html delete mode 100644 files/zh-tw/web/api/nondocumenttypechildnode/index.html (limited to 'files') diff --git a/files/es/conflicting/web/api/element/index.html b/files/es/conflicting/web/api/element/index.html new file mode 100644 index 0000000000..20f5c6ea40 --- /dev/null +++ b/files/es/conflicting/web/api/element/index.html @@ -0,0 +1,132 @@ +--- +title: NonDocumentTypeChildNode +slug: Web/API/NonDocumentTypeChildNode +tags: + - API + - DOM + - Interface + - NeedsTranslation + - Reference + - TopicStub +translation_of: Web/API/NonDocumentTypeChildNode +--- +
{{APIRef("DOM")}}
+ +

The NonDocumentTypeChildNode interface contains methods that are particular to {{domxref("Node")}} objects that can have a parent, but not suitable for {{domxref("DocumentType")}}.

+ +

NonDocumentTypeChildNode is a raw interface and no object of this type can be created; it is implemented by {{domxref("Element")}}, and {{domxref("CharacterData")}} objects.

+ +

Properties

+ +

There is no inherited property.

+ +
+
{{domxref("NonDocumentTypeChildNode.previousElementSibling")}} {{readonlyInline}}
+
Returns the {{domxref("Element")}} immediately prior to this node in its parent's children list, or null if there is no {{domxref("Element")}} in the list prior to this node.
+
{{domxref("NonDocumentTypeChildNode.nextElementSibling")}} {{readonlyInline}}
+
Returns the {{domxref("Element")}} immediately following this node in its parent's children list, or null if there is no {{domxref("Element")}} in the list following this node.
+
+ +

Methods

+ +

There is neither inherited, nor specific method.

+ +

Specifications

+ + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('DOM WHATWG', '#interface-childnode', 'NonDocumentTypeChildNode')}}{{Spec2('DOM WHATWG')}}Splitted the ElementTraversal interface in {{domxref("ParentNode")}}, {{domxref("ChildNode")}}, and NonDocumentTypeChildNode. The previousElementSibling and nextElementSibling are now defined on the latter.
+ The {{domxref("CharacterData")}} and {{domxref("Element")}} implemented the new interfaces.
{{SpecName('Element Traversal', '#interface-elementTraversal', 'ElementTraversal')}}{{Spec2('Element Traversal')}}Added the initial definition of its properties to the ElementTraversal pure interface and use it on {{domxref("Element")}}.
+ +

Browser compatibility

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support (on {{domxref("Element")}})1.0{{CompatGeckoDesktop("1.9.1")}}9.010.04.0
Support (on {{domxref("CharacterData")}})1.0{{CompatGeckoDesktop("25.0")}} [1]9.010.04.0
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support (on {{domxref("Element")}}){{ CompatVersionUnknown() }}{{CompatGeckoDesktop("1.9.1")}}{{ CompatVersionUnknown() }}10.0{{ CompatVersionUnknown() }}
Support (on {{domxref("CharacterData")}}){{ CompatVersionUnknown() }}{{CompatGeckoDesktop("25.0")}}{{ CompatVersionUnknown() }}10.0{{ CompatVersionUnknown() }}
+
+ +

[1] Firefox 25 also added the two properties defined here on {{domxref("DocumentType")}}, this was removed in Firefox 28 due to compatibility problems, and led to the creation of this new pure interface.

+ +

See also

+ + diff --git a/files/es/web/api/element/nextelementsibling/index.html b/files/es/web/api/element/nextelementsibling/index.html new file mode 100644 index 0000000000..68395bc2b3 --- /dev/null +++ b/files/es/web/api/element/nextelementsibling/index.html @@ -0,0 +1,113 @@ +--- +title: NonDocumentTypeChildNode.nextElementSibling +slug: Web/API/NonDocumentTypeChildNode/nextElementSibling +tags: + - API + - DOM + - NonDocumentTypeChildNode + - Propiedad +translation_of: Web/API/NonDocumentTypeChildNode/nextElementSibling +--- +
{{APIRef("DOM")}}
+ +

La propiedad de sólo lectura NonDocumentTypeChildNode.nextElementSibling devuelve el elemento inmediatamente posterior al especificado, dentro de la lista de elementos hijos de su padre, o bien null si el elemento especificado es el último en dicha lista.

+ +

Sintaxis

+ +
var nextNode = elementNodeReference.nextElementSibling; 
+ +

Ejemplo

+ +
<div id="div-01">Here is div-01</div>
+<div id="div-02">Here is div-02</div>
+
+<script type="text/javascript">
+  var el = document.getElementById('div-01').nextElementSibling;
+  console.log('Siblings of div-01:');
+  while (el) {
+    console.log(el.nodeName);
+    el = el.nextElementSibling;
+  }
+</script>
+
+ +

Este ejemplo muestra en la consola lo siguiente cuando se carga:

+ +
Siblings of div-01:
+DIV
+SCRIPT
+ +

Polyfill para Internet Explorer 8

+ +

Esta propiedad no está soportada con anterioridad a IE9, así que el siguiente fragmento de código puede utilizarse para añadir el soporte a IE8:

+ +
// Source: https://github.com/Alhadis/Snippets/blob/master/js/polyfills/IE8-child-elements.js
+if(!("nextElementSibling" in document.documentElement)){
+    Object.defineProperty(Element.prototype, "nextElementSibling", {
+        get: function(){
+            var e = this.nextSibling;
+            while(e && 1 !== e.nodeType)
+                e = e.nextSibling;
+            return e;
+        }
+    });
+}
+ +

Polyfill para Internet Explorer 9+ y Safari

+ +
// Source: https://github.com/jserz/js_piece/blob/master/DOM/NonDocumentTypeChildNode/nextElementSibling/nextElementSibling.md
+(function (arr) {
+  arr.forEach(function (item) {
+    if (item.hasOwnProperty('nextElementSibling')) {
+      return;
+    }
+    Object.defineProperty(item, 'nextElementSibling', {
+      configurable: true,
+      enumerable: true,
+      get: function () {
+        var el = this;
+        while (el = el.nextSibling) {
+          if (el.nodeType === 1) {
+              return el;
+          }
+        }
+        return null;
+      },
+      set: undefined
+    });
+  });
+})([Element.prototype, CharacterData.prototype]);
+ +

Especificaciones

+ + + + + + + + + + + + + + + + + + + +
EspecificaciónEstadoObservaciones
{{SpecName('DOM WHATWG', '#dom-nondocumenttypechildnode-nextelementsibling', 'ChildNodenextElementSibling')}}{{Spec2('DOM WHATWG')}}Se dividió la interfaz ElementTraversal en {{domxref("ChildNode")}}, {{domxref("ParentNode")}}, y {{domxref("NonDocumentTypeChildNode")}}. Este método queda ahora definido en la primera.
+ Los interfaces {{domxref("Element")}} y {{domxref("CharacterData")}} implementaron la nueva interfaz.
{{SpecName('Element Traversal', '#attribute-nextElementSibling', 'ElementTraversal.nextElementSibling')}}{{Spec2('Element Traversal')}}Añadió su definición inicial a la interfaz pura ElementTraversal y su uso en {{domxref("Element")}}.
+ +

Compatibilidad con navegadores

+ +

{{Compat("api.NonDocumentTypeChildNode.nextElementSibling")}}

+ +

Ver también

+ + diff --git a/files/es/web/api/element/previouselementsibling/index.html b/files/es/web/api/element/previouselementsibling/index.html new file mode 100644 index 0000000000..13867e8fe4 --- /dev/null +++ b/files/es/web/api/element/previouselementsibling/index.html @@ -0,0 +1,160 @@ +--- +title: NonDocumentTypeChildNode.previousElementSibling +slug: Web/API/NonDocumentTypeChildNode/previousElementSibling +translation_of: Web/API/NonDocumentTypeChildNode/previousElementSibling +--- +
+
{{APIRef("DOM")}}
+
+ +

La propiedad de sólo lectura NonDocumentTypeChildNode.previousElementSibling retorna el {{domxref("Element")}} predecesor inmediato al especificado dentro de la lista de hijos de su padre, o bien null si el elemento especificado es el primero de dicha lista.

+ +

Sintaxis

+ +
prevNode = elementNodeReference.previousElementSibling;
+
+ +

Ejemplo

+ +
<div id="div-01">Aquí está div-01</div>
+<div id="div-02">Aquí está div-02</div>
+<li>Esto es un elemento de lista</li>
+<li>Esto es otro elemento de lista</li>
+<div id="div-03">Aquí esta div-03</div>
+
+<script>
+  var el = document.getElementById('div-03').previousElementSibling;
+  document.write('<p>Hermanos de div-03</p><ol>');
+  while (el) {
+    document.write('<li>' + el.nodeName + '</li>');
+    el = el.previousElementSibling;
+  }
+  document.write('</ol>');
+</script>
+
+ +

Este ejemplo muestra lo siguiente en la página cuando carga:

+ +
Hermanos de div-03
+
+   1. LI
+   2. LI
+   3. DIV
+   4. DIV
+
+ +

Polyfill para Internet Explorer 8

+ +

Esta propiedad no está soportada con anterioridad a IE9, así que puede utilizarse el siguiente fragmento para añadri el soporte a IE8:

+ +
// Source: https://github.com/Alhadis/Snippets/blob/master/js/polyfills/IE8-child-elements.js
+if(!("previousElementSibling" in document.documentElement)){
+    Object.defineProperty(Element.prototype, "previousElementSibling", {
+        get: function(){
+            var e = this.previousSibling;
+            while(e && 1 !== e.nodeType)
+                e = e.previousSibling;
+            return e;
+        }
+    });
+}
+ +

Especificaciones

+ + + + + + + + + + + + + + + + + + + +
EspecificaciónEstadoObservaciones
{{SpecName('DOM WHATWG', '#dom-nondocumenttypechildnode-previouselementsibling', 'NonDocumentTypeChildNode.previousElementSibling')}}{{Spec2('DOM WHATWG')}}Dividió el interfaz ElementTraversal en {{domxref("ChildNode")}}, {{domxref("ParentNode")}}, y {{domxref("NonDocumentTypeChildNode")}}. Este método queda ahora definida en el primero.
+ Los interfaces {{domxref("Element")}} y {{domxref("CharacterData")}} implementaron la nueva interfaz.
{{SpecName('Element Traversal', '#attribute-previousElementSibling', 'ElementTraversal.previousElementSibling')}}{{Spec2('Element Traversal')}}Añadida su definición inicial al interfaz puro ElementTraversal y lo usa en {{domxref("Element")}}.
+ +

Compatibilidad con navegadores

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
PrestaciónChromeFirefox (Gecko)Internet ExplorerOperaSafari
Soporte básico (en {{domxref("Element")}})4{{CompatGeckoDesktop("1.9.1")}}99.84
Soporte en {{domxref("CharacterData")}}29.0{{CompatGeckoDesktop("25")}} [1]{{CompatNo}}16.0{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
PrestaciónAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Soporte básico (en {{domxref("Element")}}){{CompatVersionUnknown}}{{CompatGeckoMobile("1.9.1")}}{{CompatVersionUnknown}}9.8{{CompatVersionUnknown}}
Soporte en {{domxref("CharacterData")}}{{CompatVersionUnknown}}{{CompatGeckoMobile("25")}}{{CompatNo}}16.0{{CompatNo}}
+
+ +

[1] Firefox 25 también añadía esta propiedad a {{domxref("DocumentType")}}, y fue eliminada en Firefox 28 debido a problemas de compatibildad.

+ +

Ver también

+ + diff --git a/files/es/web/api/nondocumenttypechildnode/index.html b/files/es/web/api/nondocumenttypechildnode/index.html deleted file mode 100644 index 20f5c6ea40..0000000000 --- a/files/es/web/api/nondocumenttypechildnode/index.html +++ /dev/null @@ -1,132 +0,0 @@ ---- -title: NonDocumentTypeChildNode -slug: Web/API/NonDocumentTypeChildNode -tags: - - API - - DOM - - Interface - - NeedsTranslation - - Reference - - TopicStub -translation_of: Web/API/NonDocumentTypeChildNode ---- -
{{APIRef("DOM")}}
- -

The NonDocumentTypeChildNode interface contains methods that are particular to {{domxref("Node")}} objects that can have a parent, but not suitable for {{domxref("DocumentType")}}.

- -

NonDocumentTypeChildNode is a raw interface and no object of this type can be created; it is implemented by {{domxref("Element")}}, and {{domxref("CharacterData")}} objects.

- -

Properties

- -

There is no inherited property.

- -
-
{{domxref("NonDocumentTypeChildNode.previousElementSibling")}} {{readonlyInline}}
-
Returns the {{domxref("Element")}} immediately prior to this node in its parent's children list, or null if there is no {{domxref("Element")}} in the list prior to this node.
-
{{domxref("NonDocumentTypeChildNode.nextElementSibling")}} {{readonlyInline}}
-
Returns the {{domxref("Element")}} immediately following this node in its parent's children list, or null if there is no {{domxref("Element")}} in the list following this node.
-
- -

Methods

- -

There is neither inherited, nor specific method.

- -

Specifications

- - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('DOM WHATWG', '#interface-childnode', 'NonDocumentTypeChildNode')}}{{Spec2('DOM WHATWG')}}Splitted the ElementTraversal interface in {{domxref("ParentNode")}}, {{domxref("ChildNode")}}, and NonDocumentTypeChildNode. The previousElementSibling and nextElementSibling are now defined on the latter.
- The {{domxref("CharacterData")}} and {{domxref("Element")}} implemented the new interfaces.
{{SpecName('Element Traversal', '#interface-elementTraversal', 'ElementTraversal')}}{{Spec2('Element Traversal')}}Added the initial definition of its properties to the ElementTraversal pure interface and use it on {{domxref("Element")}}.
- -

Browser compatibility

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support (on {{domxref("Element")}})1.0{{CompatGeckoDesktop("1.9.1")}}9.010.04.0
Support (on {{domxref("CharacterData")}})1.0{{CompatGeckoDesktop("25.0")}} [1]9.010.04.0
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support (on {{domxref("Element")}}){{ CompatVersionUnknown() }}{{CompatGeckoDesktop("1.9.1")}}{{ CompatVersionUnknown() }}10.0{{ CompatVersionUnknown() }}
Support (on {{domxref("CharacterData")}}){{ CompatVersionUnknown() }}{{CompatGeckoDesktop("25.0")}}{{ CompatVersionUnknown() }}10.0{{ CompatVersionUnknown() }}
-
- -

[1] Firefox 25 also added the two properties defined here on {{domxref("DocumentType")}}, this was removed in Firefox 28 due to compatibility problems, and led to the creation of this new pure interface.

- -

See also

- - diff --git a/files/es/web/api/nondocumenttypechildnode/nextelementsibling/index.html b/files/es/web/api/nondocumenttypechildnode/nextelementsibling/index.html deleted file mode 100644 index 68395bc2b3..0000000000 --- a/files/es/web/api/nondocumenttypechildnode/nextelementsibling/index.html +++ /dev/null @@ -1,113 +0,0 @@ ---- -title: NonDocumentTypeChildNode.nextElementSibling -slug: Web/API/NonDocumentTypeChildNode/nextElementSibling -tags: - - API - - DOM - - NonDocumentTypeChildNode - - Propiedad -translation_of: Web/API/NonDocumentTypeChildNode/nextElementSibling ---- -
{{APIRef("DOM")}}
- -

La propiedad de sólo lectura NonDocumentTypeChildNode.nextElementSibling devuelve el elemento inmediatamente posterior al especificado, dentro de la lista de elementos hijos de su padre, o bien null si el elemento especificado es el último en dicha lista.

- -

Sintaxis

- -
var nextNode = elementNodeReference.nextElementSibling; 
- -

Ejemplo

- -
<div id="div-01">Here is div-01</div>
-<div id="div-02">Here is div-02</div>
-
-<script type="text/javascript">
-  var el = document.getElementById('div-01').nextElementSibling;
-  console.log('Siblings of div-01:');
-  while (el) {
-    console.log(el.nodeName);
-    el = el.nextElementSibling;
-  }
-</script>
-
- -

Este ejemplo muestra en la consola lo siguiente cuando se carga:

- -
Siblings of div-01:
-DIV
-SCRIPT
- -

Polyfill para Internet Explorer 8

- -

Esta propiedad no está soportada con anterioridad a IE9, así que el siguiente fragmento de código puede utilizarse para añadir el soporte a IE8:

- -
// Source: https://github.com/Alhadis/Snippets/blob/master/js/polyfills/IE8-child-elements.js
-if(!("nextElementSibling" in document.documentElement)){
-    Object.defineProperty(Element.prototype, "nextElementSibling", {
-        get: function(){
-            var e = this.nextSibling;
-            while(e && 1 !== e.nodeType)
-                e = e.nextSibling;
-            return e;
-        }
-    });
-}
- -

Polyfill para Internet Explorer 9+ y Safari

- -
// Source: https://github.com/jserz/js_piece/blob/master/DOM/NonDocumentTypeChildNode/nextElementSibling/nextElementSibling.md
-(function (arr) {
-  arr.forEach(function (item) {
-    if (item.hasOwnProperty('nextElementSibling')) {
-      return;
-    }
-    Object.defineProperty(item, 'nextElementSibling', {
-      configurable: true,
-      enumerable: true,
-      get: function () {
-        var el = this;
-        while (el = el.nextSibling) {
-          if (el.nodeType === 1) {
-              return el;
-          }
-        }
-        return null;
-      },
-      set: undefined
-    });
-  });
-})([Element.prototype, CharacterData.prototype]);
- -

Especificaciones

- - - - - - - - - - - - - - - - - - - -
EspecificaciónEstadoObservaciones
{{SpecName('DOM WHATWG', '#dom-nondocumenttypechildnode-nextelementsibling', 'ChildNodenextElementSibling')}}{{Spec2('DOM WHATWG')}}Se dividió la interfaz ElementTraversal en {{domxref("ChildNode")}}, {{domxref("ParentNode")}}, y {{domxref("NonDocumentTypeChildNode")}}. Este método queda ahora definido en la primera.
- Los interfaces {{domxref("Element")}} y {{domxref("CharacterData")}} implementaron la nueva interfaz.
{{SpecName('Element Traversal', '#attribute-nextElementSibling', 'ElementTraversal.nextElementSibling')}}{{Spec2('Element Traversal')}}Añadió su definición inicial a la interfaz pura ElementTraversal y su uso en {{domxref("Element")}}.
- -

Compatibilidad con navegadores

- -

{{Compat("api.NonDocumentTypeChildNode.nextElementSibling")}}

- -

Ver también

- - diff --git a/files/es/web/api/nondocumenttypechildnode/previouselementsibling/index.html b/files/es/web/api/nondocumenttypechildnode/previouselementsibling/index.html deleted file mode 100644 index 13867e8fe4..0000000000 --- a/files/es/web/api/nondocumenttypechildnode/previouselementsibling/index.html +++ /dev/null @@ -1,160 +0,0 @@ ---- -title: NonDocumentTypeChildNode.previousElementSibling -slug: Web/API/NonDocumentTypeChildNode/previousElementSibling -translation_of: Web/API/NonDocumentTypeChildNode/previousElementSibling ---- -
-
{{APIRef("DOM")}}
-
- -

La propiedad de sólo lectura NonDocumentTypeChildNode.previousElementSibling retorna el {{domxref("Element")}} predecesor inmediato al especificado dentro de la lista de hijos de su padre, o bien null si el elemento especificado es el primero de dicha lista.

- -

Sintaxis

- -
prevNode = elementNodeReference.previousElementSibling;
-
- -

Ejemplo

- -
<div id="div-01">Aquí está div-01</div>
-<div id="div-02">Aquí está div-02</div>
-<li>Esto es un elemento de lista</li>
-<li>Esto es otro elemento de lista</li>
-<div id="div-03">Aquí esta div-03</div>
-
-<script>
-  var el = document.getElementById('div-03').previousElementSibling;
-  document.write('<p>Hermanos de div-03</p><ol>');
-  while (el) {
-    document.write('<li>' + el.nodeName + '</li>');
-    el = el.previousElementSibling;
-  }
-  document.write('</ol>');
-</script>
-
- -

Este ejemplo muestra lo siguiente en la página cuando carga:

- -
Hermanos de div-03
-
-   1. LI
-   2. LI
-   3. DIV
-   4. DIV
-
- -

Polyfill para Internet Explorer 8

- -

Esta propiedad no está soportada con anterioridad a IE9, así que puede utilizarse el siguiente fragmento para añadri el soporte a IE8:

- -
// Source: https://github.com/Alhadis/Snippets/blob/master/js/polyfills/IE8-child-elements.js
-if(!("previousElementSibling" in document.documentElement)){
-    Object.defineProperty(Element.prototype, "previousElementSibling", {
-        get: function(){
-            var e = this.previousSibling;
-            while(e && 1 !== e.nodeType)
-                e = e.previousSibling;
-            return e;
-        }
-    });
-}
- -

Especificaciones

- - - - - - - - - - - - - - - - - - - -
EspecificaciónEstadoObservaciones
{{SpecName('DOM WHATWG', '#dom-nondocumenttypechildnode-previouselementsibling', 'NonDocumentTypeChildNode.previousElementSibling')}}{{Spec2('DOM WHATWG')}}Dividió el interfaz ElementTraversal en {{domxref("ChildNode")}}, {{domxref("ParentNode")}}, y {{domxref("NonDocumentTypeChildNode")}}. Este método queda ahora definida en el primero.
- Los interfaces {{domxref("Element")}} y {{domxref("CharacterData")}} implementaron la nueva interfaz.
{{SpecName('Element Traversal', '#attribute-previousElementSibling', 'ElementTraversal.previousElementSibling')}}{{Spec2('Element Traversal')}}Añadida su definición inicial al interfaz puro ElementTraversal y lo usa en {{domxref("Element")}}.
- -

Compatibilidad con navegadores

- -
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
PrestaciónChromeFirefox (Gecko)Internet ExplorerOperaSafari
Soporte básico (en {{domxref("Element")}})4{{CompatGeckoDesktop("1.9.1")}}99.84
Soporte en {{domxref("CharacterData")}}29.0{{CompatGeckoDesktop("25")}} [1]{{CompatNo}}16.0{{CompatNo}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
PrestaciónAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Soporte básico (en {{domxref("Element")}}){{CompatVersionUnknown}}{{CompatGeckoMobile("1.9.1")}}{{CompatVersionUnknown}}9.8{{CompatVersionUnknown}}
Soporte en {{domxref("CharacterData")}}{{CompatVersionUnknown}}{{CompatGeckoMobile("25")}}{{CompatNo}}16.0{{CompatNo}}
-
- -

[1] Firefox 25 también añadía esta propiedad a {{domxref("DocumentType")}}, y fue eliminada en Firefox 28 debido a problemas de compatibildad.

- -

Ver también

- - diff --git a/files/fr/conflicting/web/accessibility/aria/widgets/index.html b/files/fr/conflicting/web/accessibility/aria/widgets/index.html new file mode 100644 index 0000000000..d951326193 --- /dev/null +++ b/files/fr/conflicting/web/accessibility/aria/widgets/index.html @@ -0,0 +1,78 @@ +--- +title: Vue d'ensemble +slug: Web/Accessibility/ARIA/widgets/overview +tags: + - Accessibility + - JavaScript + - Landing + - NeedsUpdate +translation_of: Web/Accessibility/ARIA/widgets/overview +--- +
Attention: besoin d'une mise à jour
+ +

Introduction

+ +

Voici un aperçu de quelques exemples concrets et de bonnes pratiques pour la création de contrôles DHTML (widgets) JavaScript.

+ +

Ressources générales

+ + + +

Case (checkbox)

+ + + + + + + +

Glissière (slider)

+ + + +

Onglets (tabs)

+ + + +

Combobox

+ + + + + + + +

Validation de formulaire

+ + + +

Tables

+ + diff --git a/files/fr/orphaned/web/api/htmlhyperlinkelementutils/index.html b/files/fr/orphaned/web/api/htmlhyperlinkelementutils/index.html new file mode 100644 index 0000000000..2470d4cf12 --- /dev/null +++ b/files/fr/orphaned/web/api/htmlhyperlinkelementutils/index.html @@ -0,0 +1,214 @@ +--- +title: URLUtils +slug: Web/API/HTMLHyperlinkElementUtils +tags: + - API + - Experimental + - JavaScript + - Reference + - URL +translation_of: Web/API/HTMLHyperlinkElementUtils +original_slug: Web/API/URLUtils +--- +

{{APIRef}}{{SeeCompatTable}}

+

L'interface URLUtils définit des méthodes utilitaires pour travailler avec les URL.

+

il n'y a pas d'objets de ce type, mais quelques objets l'implémentent, comme {{domxref("Location")}}, {{domxref("URL")}}, {{domxref("HTMLAnchorElement")}}, et {{domxref("HTMLAreaElement")}}.

+

Propriétés

+

Cette interface n'hérite d'aucune propriété.

+
+
+ {{domxref("URLUtils.href")}}
+
+ Une {{domxref("DOMString")}} contenant l'URL entière.
+
+ {{domxref("URLUtils.protocol")}}
+
+ Une {{domxref("DOMString")}} contenant le schéma de protocole de l'URL, incluant le ':' final.
+
+ {{domxref("URLUtils.host")}}
+
+ Une {{domxref("DOMString")}} contenant l'hôte, c'est-à-dire le domaine, et, si le port de l'URL n'est pas vide (ce qui peut arriver s'il n'a pas été spécifié ou si la valeur spécifiée est celle du port par défaut du schéma de l'URL), un ':', et le port de l'URL.
+
+ {{domxref("URLUtils.hostname")}}
+
+ Une {{domxref("DOMString")}} contenant le domaine de l'URL.
+
+ {{domxref("URLUtils.port")}}
+
+ Une {{domxref("DOMString")}} contenant le numéro de port de l'URL.
+
+ {{domxref("URLUtils.pathname")}}
+
+ Une {{domxref("DOMString")}} contenant un '/' initial suivi du chemin de l'URL.
+
+ {{domxref("URLUtils.search")}}
+
+ Une {{domxref("DOMString")}} contenant un '?' suivi des paramètres de l'URL.
+
+ {{domxref("URLUtils.hash")}}
+
+ Une {{domxref("DOMString")}} contenant un '#' suivi de l'identifiant de fragment de l'URL.
+
+ {{domxref("URLUtils.username")}}
+
+ Une {{domxref("DOMString")}} contenant le nom d'utilisateur spécifié devant le nom de domaine.
+
+ {{domxref("URLUtils.password")}}
+
+ Une {{domxref("DOMString")}} contenant le mot de passe spécifié devant le nom de domaine.
+
+ {{domxref("URLUtils.origin")}} {{readonlyInline}}
+
+ Retourne une {{domxref("DOMString")}} contenant l'origine de l'URL, c'est-à-dire son schéma, son domaine et son port.
+
+ {{domxref("URLUtils.searchParams")}}
+
+ Retourne un objet {{domxref("URLSearchParams")}} permettant d'accéder aux arguments de requête GET contenus dans l'URL.
+
+

Méthodes

+

Cette interface n'hérite d'aucune méthode.

+
+
+ {{domxref("URLUtils.toString()")}}
+
+ Retourne une {{domxref("DOMString")}} contenant l'URL entière. C'est un synonyme de {{domxref("URLUtils.href")}}, sauf qu'il ne peut être utilisé pour modifier la valeur.
+
+

Spécifications

+ + + + + + + + + + + + + + + +
SpécificationStatutCommentaires
{{SpecName('URL', '#urlutils', 'URLUtils')}}{{Spec2('URL')}}Définition initiale
+

Compatibilité

+

{{ CompatibilityTable() }}

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FonctionnalitéChromeFirefox (Gecko)Internet ExplorerOperaSafari
Support de base{{CompatNo}} [1]{{CompatGeckoDesktop("22")}} [1]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
searchParams{{CompatUnknown}}{{CompatGeckoDesktop("29")}}{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}
username et password{{CompatUnknown}}{{CompatGeckoDesktop("26")}}{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}
origin{{CompatUnknown}}{{CompatGeckoDesktop("26")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
origin sur Window.location{{CompatUnknown}}{{CompatGeckoDesktop("21")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FonctionnalitéAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Support de base{{CompatNo}} [1]{{CompatNo}} [1]{{CompatGeckoMobile("22")}} [1]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
searchParams{{CompatUnknown}}{{CompatUnknown}}{{CompatNo}}{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}
username et password{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("26")}}{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}
origin{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("26")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
origin sur Window.location{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("21")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+

[1] Bien qu'elles ne soient pas groupées dans une seule interface abstraite, ces méthodes sont directement disponibles sur les interfaces qui les implémentent, si cette interface est supportée.

+

Voir aussi

+ diff --git a/files/fr/web/accessibility/aria/widgets/overview/index.html b/files/fr/web/accessibility/aria/widgets/overview/index.html deleted file mode 100644 index d951326193..0000000000 --- a/files/fr/web/accessibility/aria/widgets/overview/index.html +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: Vue d'ensemble -slug: Web/Accessibility/ARIA/widgets/overview -tags: - - Accessibility - - JavaScript - - Landing - - NeedsUpdate -translation_of: Web/Accessibility/ARIA/widgets/overview ---- -
Attention: besoin d'une mise à jour
- -

Introduction

- -

Voici un aperçu de quelques exemples concrets et de bonnes pratiques pour la création de contrôles DHTML (widgets) JavaScript.

- -

Ressources générales

- - - -

Case (checkbox)

- - - - - - - -

Glissière (slider)

- - - -

Onglets (tabs)

- - - -

Combobox

- - - - - - - -

Validation de formulaire

- - - -

Tables

- - diff --git a/files/fr/web/api/document/activeelement/index.html b/files/fr/web/api/document/activeelement/index.html new file mode 100644 index 0000000000..c9fb2d863c --- /dev/null +++ b/files/fr/web/api/document/activeelement/index.html @@ -0,0 +1,26 @@ +--- +title: document.activeElement +slug: Web/API/DocumentOrShadowRoot/activeElement +tags: + - Référence_du_DOM_Gecko +translation_of: Web/API/DocumentOrShadowRoot/activeElement +translation_of_original: Web/API/Document/activeElement +original_slug: Web/API/Document/activeElement +--- +

{{ ApiRef() }}

+

Résumé

+

Renvoie l'élément qui dispose actuellement du focus.

+

{{ Note("Cet attribut fait partie de la spécification HTML 5 encore en développement.") }}

+

Syntaxe

+
var elemCourant = document.activeElement;
+
+

Exemple

+

Spécification

+ +

 

+

 

+
+  
+

{{ languages( { "en": "en/DOM/document.activeElement", "es": "es/DOM/element.activeElement", "ja": "ja/DOM/document.activeElement", "pl": "pl/DOM/document.activeElement" } ) }}

diff --git a/files/fr/web/api/documentorshadowroot/activeelement/index.html b/files/fr/web/api/documentorshadowroot/activeelement/index.html deleted file mode 100644 index c9fb2d863c..0000000000 --- a/files/fr/web/api/documentorshadowroot/activeelement/index.html +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: document.activeElement -slug: Web/API/DocumentOrShadowRoot/activeElement -tags: - - Référence_du_DOM_Gecko -translation_of: Web/API/DocumentOrShadowRoot/activeElement -translation_of_original: Web/API/Document/activeElement -original_slug: Web/API/Document/activeElement ---- -

{{ ApiRef() }}

-

Résumé

-

Renvoie l'élément qui dispose actuellement du focus.

-

{{ Note("Cet attribut fait partie de la spécification HTML 5 encore en développement.") }}

-

Syntaxe

-
var elemCourant = document.activeElement;
-
-

Exemple

-

Spécification

- -

 

-

 

-
-  
-

{{ languages( { "en": "en/DOM/document.activeElement", "es": "es/DOM/element.activeElement", "ja": "ja/DOM/document.activeElement", "pl": "pl/DOM/document.activeElement" } ) }}

diff --git a/files/fr/web/api/htmlhyperlinkelementutils/index.html b/files/fr/web/api/htmlhyperlinkelementutils/index.html deleted file mode 100644 index 2470d4cf12..0000000000 --- a/files/fr/web/api/htmlhyperlinkelementutils/index.html +++ /dev/null @@ -1,214 +0,0 @@ ---- -title: URLUtils -slug: Web/API/HTMLHyperlinkElementUtils -tags: - - API - - Experimental - - JavaScript - - Reference - - URL -translation_of: Web/API/HTMLHyperlinkElementUtils -original_slug: Web/API/URLUtils ---- -

{{APIRef}}{{SeeCompatTable}}

-

L'interface URLUtils définit des méthodes utilitaires pour travailler avec les URL.

-

il n'y a pas d'objets de ce type, mais quelques objets l'implémentent, comme {{domxref("Location")}}, {{domxref("URL")}}, {{domxref("HTMLAnchorElement")}}, et {{domxref("HTMLAreaElement")}}.

-

Propriétés

-

Cette interface n'hérite d'aucune propriété.

-
-
- {{domxref("URLUtils.href")}}
-
- Une {{domxref("DOMString")}} contenant l'URL entière.
-
- {{domxref("URLUtils.protocol")}}
-
- Une {{domxref("DOMString")}} contenant le schéma de protocole de l'URL, incluant le ':' final.
-
- {{domxref("URLUtils.host")}}
-
- Une {{domxref("DOMString")}} contenant l'hôte, c'est-à-dire le domaine, et, si le port de l'URL n'est pas vide (ce qui peut arriver s'il n'a pas été spécifié ou si la valeur spécifiée est celle du port par défaut du schéma de l'URL), un ':', et le port de l'URL.
-
- {{domxref("URLUtils.hostname")}}
-
- Une {{domxref("DOMString")}} contenant le domaine de l'URL.
-
- {{domxref("URLUtils.port")}}
-
- Une {{domxref("DOMString")}} contenant le numéro de port de l'URL.
-
- {{domxref("URLUtils.pathname")}}
-
- Une {{domxref("DOMString")}} contenant un '/' initial suivi du chemin de l'URL.
-
- {{domxref("URLUtils.search")}}
-
- Une {{domxref("DOMString")}} contenant un '?' suivi des paramètres de l'URL.
-
- {{domxref("URLUtils.hash")}}
-
- Une {{domxref("DOMString")}} contenant un '#' suivi de l'identifiant de fragment de l'URL.
-
- {{domxref("URLUtils.username")}}
-
- Une {{domxref("DOMString")}} contenant le nom d'utilisateur spécifié devant le nom de domaine.
-
- {{domxref("URLUtils.password")}}
-
- Une {{domxref("DOMString")}} contenant le mot de passe spécifié devant le nom de domaine.
-
- {{domxref("URLUtils.origin")}} {{readonlyInline}}
-
- Retourne une {{domxref("DOMString")}} contenant l'origine de l'URL, c'est-à-dire son schéma, son domaine et son port.
-
- {{domxref("URLUtils.searchParams")}}
-
- Retourne un objet {{domxref("URLSearchParams")}} permettant d'accéder aux arguments de requête GET contenus dans l'URL.
-
-

Méthodes

-

Cette interface n'hérite d'aucune méthode.

-
-
- {{domxref("URLUtils.toString()")}}
-
- Retourne une {{domxref("DOMString")}} contenant l'URL entière. C'est un synonyme de {{domxref("URLUtils.href")}}, sauf qu'il ne peut être utilisé pour modifier la valeur.
-
-

Spécifications

- - - - - - - - - - - - - - - -
SpécificationStatutCommentaires
{{SpecName('URL', '#urlutils', 'URLUtils')}}{{Spec2('URL')}}Définition initiale
-

Compatibilité

-

{{ CompatibilityTable() }}

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FonctionnalitéChromeFirefox (Gecko)Internet ExplorerOperaSafari
Support de base{{CompatNo}} [1]{{CompatGeckoDesktop("22")}} [1]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
searchParams{{CompatUnknown}}{{CompatGeckoDesktop("29")}}{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}
username et password{{CompatUnknown}}{{CompatGeckoDesktop("26")}}{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}
origin{{CompatUnknown}}{{CompatGeckoDesktop("26")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
origin sur Window.location{{CompatUnknown}}{{CompatGeckoDesktop("21")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FonctionnalitéAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Support de base{{CompatNo}} [1]{{CompatNo}} [1]{{CompatGeckoMobile("22")}} [1]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
searchParams{{CompatUnknown}}{{CompatUnknown}}{{CompatNo}}{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}
username et password{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("26")}}{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}
origin{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("26")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
origin sur Window.location{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("21")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
-

[1] Bien qu'elles ne soient pas groupées dans une seule interface abstraite, ces méthodes sont directement disponibles sur les interfaces qui les implémentent, si cette interface est supportée.

-

Voir aussi

- diff --git a/files/it/orphaned/web/api/htmlhyperlinkelementutils/index.html b/files/it/orphaned/web/api/htmlhyperlinkelementutils/index.html new file mode 100644 index 0000000000..e62eda611d --- /dev/null +++ b/files/it/orphaned/web/api/htmlhyperlinkelementutils/index.html @@ -0,0 +1,206 @@ +--- +title: URLUtils +slug: Web/API/HTMLHyperlinkElementUtils +translation_of: Web/API/HTMLHyperlinkElementUtils +original_slug: Web/API/URLUtils +--- +

{{ApiRef("URL API")}}{{SeeCompatTable}}

+ +

The URLUtils interface defines utility methods to work with URLs.

+ +

There are no objects of this type, but several objects implement it, such as {{domxref("Location")}}, {{domxref("URL")}}, {{domxref("HTMLAnchorElement")}}, and {{domxref("HTMLAreaElement")}}.

+ +

Properties

+ +

This interface doesn't inherit any property.

+ +
+
{{domxref("URLUtils.href")}}
+
Is a {{domxref("DOMString")}} containing the whole URL.
+
{{domxref("URLUtils.protocol")}}
+
Is a {{domxref("DOMString")}} containing the protocol scheme of the URL, including the final ':'.
+
{{domxref("URLUtils.host")}}
+
Is a {{domxref("DOMString")}} containing the host, that is the hostname, and then, if the port of the URL is not empty (which can happen because it was not specified or because it was specified to be the default port of the URL's scheme), a ':', and the port of the URL.
+
{{domxref("URLUtils.hostname")}}
+
Is a {{domxref("DOMString")}} containing the domain of the URL.
+
{{domxref("URLUtils.port")}}
+
Is a {{domxref("DOMString")}} containing the port number of the URL.
+
{{domxref("URLUtils.pathname")}}
+
Is a {{domxref("DOMString")}} containing an initial '/' followed by the path of the URL.
+
{{domxref("URLUtils.search")}}
+
Is a {{domxref("DOMString")}} containing a '?' followed by the parameters of the URL.
+
{{domxref("URLUtils.hash")}}
+
Is a {{domxref("DOMString")}} containing a '#' followed by the fragment identifier of the URL.
+
{{domxref("URLUtils.username")}}
+
Is a {{domxref("DOMString")}} containing the username specified before the domain name.
+
{{domxref("URLUtils.password")}}
+
Is a {{domxref("DOMString")}} containing the password specified before the domain name.
+
{{domxref("URLUtils.origin")}} {{readonlyInline}}
+
Returns a {{domxref("DOMString")}} containing the origin of the URL, that is its scheme, its domain and its port.
+
{{domxref("URLUtils.searchParams")}}
+
Returns a {{domxref("URLSearchParams")}} object allowing to access the GET query arguments contained in the URL.
+
+ +

Methods

+ +

This interface doesn't inherit any method.

+ +
+
{{domxref("URLUtils.toString()")}}
+
Returns a {{domxref("DOMString")}} containing the whole URL. It is a synonym for {{domxref("URLUtils.href")}}, though it can't be used to modify the value.
+
+ +

Specifications

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('URL', '#urlutils', 'URLUtils')}}{{Spec2('URL')}}Initial definition
+ +

Browser compatibility

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatNo}} [1]{{CompatGeckoDesktop("22")}} [1]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
searchParams{{CompatUnknown}}{{CompatGeckoDesktop("29")}}{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}
username and password{{CompatUnknown}}{{CompatGeckoDesktop("26")}}{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}
origin {{CompatUnknown}}{{CompatGeckoDesktop("26")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
origin on Windows.location{{CompatUnknown}}{{CompatGeckoDesktop("21")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatNo}} [1]{{CompatNo}} [1]{{CompatGeckoMobile("22")}} [1]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
searchParams{{CompatUnknown}}{{CompatUnknown}}{{CompatNo}}{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}
username and password{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("26")}}{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}
origin {{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("26")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
origin on Windows.location{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("21")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +

[1] Though not grouped in a single abstract interface, these methods are directly available on the interfaces that implement it, if this interface is supported.

+ +

See also

+ + + +

+
+
+ +
 
+
diff --git a/files/it/web/api/htmlhyperlinkelementutils/index.html b/files/it/web/api/htmlhyperlinkelementutils/index.html deleted file mode 100644 index e62eda611d..0000000000 --- a/files/it/web/api/htmlhyperlinkelementutils/index.html +++ /dev/null @@ -1,206 +0,0 @@ ---- -title: URLUtils -slug: Web/API/HTMLHyperlinkElementUtils -translation_of: Web/API/HTMLHyperlinkElementUtils -original_slug: Web/API/URLUtils ---- -

{{ApiRef("URL API")}}{{SeeCompatTable}}

- -

The URLUtils interface defines utility methods to work with URLs.

- -

There are no objects of this type, but several objects implement it, such as {{domxref("Location")}}, {{domxref("URL")}}, {{domxref("HTMLAnchorElement")}}, and {{domxref("HTMLAreaElement")}}.

- -

Properties

- -

This interface doesn't inherit any property.

- -
-
{{domxref("URLUtils.href")}}
-
Is a {{domxref("DOMString")}} containing the whole URL.
-
{{domxref("URLUtils.protocol")}}
-
Is a {{domxref("DOMString")}} containing the protocol scheme of the URL, including the final ':'.
-
{{domxref("URLUtils.host")}}
-
Is a {{domxref("DOMString")}} containing the host, that is the hostname, and then, if the port of the URL is not empty (which can happen because it was not specified or because it was specified to be the default port of the URL's scheme), a ':', and the port of the URL.
-
{{domxref("URLUtils.hostname")}}
-
Is a {{domxref("DOMString")}} containing the domain of the URL.
-
{{domxref("URLUtils.port")}}
-
Is a {{domxref("DOMString")}} containing the port number of the URL.
-
{{domxref("URLUtils.pathname")}}
-
Is a {{domxref("DOMString")}} containing an initial '/' followed by the path of the URL.
-
{{domxref("URLUtils.search")}}
-
Is a {{domxref("DOMString")}} containing a '?' followed by the parameters of the URL.
-
{{domxref("URLUtils.hash")}}
-
Is a {{domxref("DOMString")}} containing a '#' followed by the fragment identifier of the URL.
-
{{domxref("URLUtils.username")}}
-
Is a {{domxref("DOMString")}} containing the username specified before the domain name.
-
{{domxref("URLUtils.password")}}
-
Is a {{domxref("DOMString")}} containing the password specified before the domain name.
-
{{domxref("URLUtils.origin")}} {{readonlyInline}}
-
Returns a {{domxref("DOMString")}} containing the origin of the URL, that is its scheme, its domain and its port.
-
{{domxref("URLUtils.searchParams")}}
-
Returns a {{domxref("URLSearchParams")}} object allowing to access the GET query arguments contained in the URL.
-
- -

Methods

- -

This interface doesn't inherit any method.

- -
-
{{domxref("URLUtils.toString()")}}
-
Returns a {{domxref("DOMString")}} containing the whole URL. It is a synonym for {{domxref("URLUtils.href")}}, though it can't be used to modify the value.
-
- -

Specifications

- - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('URL', '#urlutils', 'URLUtils')}}{{Spec2('URL')}}Initial definition
- -

Browser compatibility

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatNo}} [1]{{CompatGeckoDesktop("22")}} [1]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
searchParams{{CompatUnknown}}{{CompatGeckoDesktop("29")}}{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}
username and password{{CompatUnknown}}{{CompatGeckoDesktop("26")}}{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}
origin {{CompatUnknown}}{{CompatGeckoDesktop("26")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
origin on Windows.location{{CompatUnknown}}{{CompatGeckoDesktop("21")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatNo}} [1]{{CompatNo}} [1]{{CompatGeckoMobile("22")}} [1]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
searchParams{{CompatUnknown}}{{CompatUnknown}}{{CompatNo}}{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}
username and password{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("26")}}{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}
origin {{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("26")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
origin on Windows.location{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("21")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -

[1] Though not grouped in a single abstract interface, these methods are directly available on the interfaces that implement it, if this interface is supported.

- -

See also

- - - -

-
-
- -
 
-
diff --git a/files/ja/conflicting/web/accessibility/aria/widgets/index.html b/files/ja/conflicting/web/accessibility/aria/widgets/index.html new file mode 100644 index 0000000000..c49401a24b --- /dev/null +++ b/files/ja/conflicting/web/accessibility/aria/widgets/index.html @@ -0,0 +1,72 @@ +--- +title: 概観 +slug: Web/Accessibility/ARIA/widgets/overview +tags: + - Accessibility + - JavaScript + - Landing + - NeedsUpdate +translation_of: Web/Accessibility/ARIA/widgets/overview +--- +
Warning: needs updating
+ +

入門

+ +

ここでは、動作する例とアクセシブルなJavaScript ウィジェットを作るベストプラクティスを見ていきます。

+ +

一般リソース

+ + + +

チェックボックス

+ + + + + + + +

スライダー

+ + + +

タブ

+ + + + + + + +

フォーム検証

+ + + +

+ + diff --git a/files/ja/conflicting/web/api/element_861159909c20acebf8e506c3bb0e2f7e/index.html b/files/ja/conflicting/web/api/element_861159909c20acebf8e506c3bb0e2f7e/index.html new file mode 100644 index 0000000000..2115525343 --- /dev/null +++ b/files/ja/conflicting/web/api/element_861159909c20acebf8e506c3bb0e2f7e/index.html @@ -0,0 +1,69 @@ +--- +title: NonDocumentTypeChildNode +slug: Web/API/NonDocumentTypeChildNode +tags: + - API + - DOM + - Interface + - NonDocumentTypeChildNode + - Reference +translation_of: Web/API/NonDocumentTypeChildNode +--- +
{{APIRef("DOM")}}
+ +

NonDocumentTypeChildNode インターフェイスは親を持つ {{domxref("Node")}} オブジェクトに固有な、{{domxref("DocumentType")}} に適していないメソッドを含みます。

+ +

NonDocumentTypeChildNode は純粋なインターフェースで、この型のオブジェクトを作ることはできません。 {{domxref("Element")}}、{{domxref("CharacterData")}} オブジェクトで実装されています。

+ +

プロパティ

+ +

継承されたプロパティはありません。

+ +
+
{{domxref("NonDocumentTypeChildNode.previousElementSibling")}} {{readonlyInline}}
+
このノードの親ノードの子リスト内にある、このノードの直前にある {{domxref("Element")}} を返します。リスト内でこのノードの前に {{domxref("Element")}} がない場合は null を返します。
+
{{domxref("NonDocumentTypeChildNode.nextElementSibling")}} {{readonlyInline}}
+
このノードの親ノードの子リスト内にある、このノードの直後にある {{domxref("Element")}} を返します。リスト内でこのノードの後に {{domxref("Element")}} がない場合は null を返します。
+
+ +

メソッド

+ +

継承、および実装されたメソッドはありません。

+ +

仕様

+ + + + + + + + + + + + + + + + + + + +
仕様書策定状況コメント
{{SpecName('DOM WHATWG', '#interface-nondocumenttypechildnode', 'NonDocumentTypeChildNode')}}{{Spec2('DOM WHATWG')}}ElementTraversal インタフェースを{{domxref("ParentNode")}}、{{domxref("ChildNode")}}、NonDocumentTypeChildNode に分割しました。後者では previousElementSiblingnextElementSibling が定義されるようになりました。
+ {{domxref("CharacterData")}} と {{domxref("Element")}} は、新しいインタフェースを実装しました。
{{SpecName('Element Traversal', '#interface-elementTraversal', 'ElementTraversal')}}{{Spec2('Element Traversal')}}ElementTraversal 基本インターフェースにプロパティの初期定義を追加し、{{domxref("Element")}} で使用できるようにしました。.
+ +

ブラウザー実装状況

+ + + +

{{Compat("api.NonDocumentTypeChildNode")}}

+ +

関連情報

+ + diff --git a/files/ja/orphaned/web/api/htmlhyperlinkelementutils/index.html b/files/ja/orphaned/web/api/htmlhyperlinkelementutils/index.html new file mode 100644 index 0000000000..bc0b1f182a --- /dev/null +++ b/files/ja/orphaned/web/api/htmlhyperlinkelementutils/index.html @@ -0,0 +1,88 @@ +--- +title: HTMLHyperlinkElementUtils +slug: Web/API/HTMLHyperlinkElementUtils +tags: + - API + - Experimental + - Mixin + - URL API +translation_of: Web/API/HTMLHyperlinkElementUtils +--- +

{{ApiRef("URL API")}}{{SeeCompatTable}}

+ +

HTMLHyperlinkElementUtils ミックスインは、{{domxref("HTMLAnchorElement")}} および {{domxref("HTMLAreaElement")}} と連携するユーティリティのメソッドとプロパティを定義します。 これらのユーティリティを使用すると、URL などの一般的な機能を処理できます。

+ +

このタイプのオブジェクトはありませんが、いくつかのオブジェクトの {{domxref("HTMLAnchorElement")}} および {{domxref("HTMLAreaElement")}} がそれを実装しています。

+ +

プロパティ

+ +
+

: このインターフェイスはプロパティを継承しません。

+
+ +
+
{{domxref("HTMLHyperlinkElementUtils.href")}}
+
これは、URL 全体を含む {{domxref("USVString")}} です。
+
{{domxref("HTMLHyperlinkElementUtils.protocol")}}
+
これは、最後の ':' を含む URL のプロトコルスキームを含む {{domxref("USVString")}} です。
+
{{domxref("HTMLHyperlinkElementUtils.host")}}
+
これは、ホストを含む {{domxref("USVString")}} です。 ホストは、ホスト名の後に、URL のポートが空でない場合、':'、および URL のポートが続きます(空は、指定されていないか、URL のスキームのデフォルトポートとして指定されているために発生する可能性があります)。
+
{{domxref("HTMLHyperlinkElementUtils.hostname")}}
+
これは、URL のドメイン(ホスト名)を含む {{domxref("USVString")}} です。
+
{{domxref("HTMLHyperlinkElementUtils.port")}}
+
これは、URL のポート番号を含む {{domxref("USVString")}} です。
+
{{domxref("HTMLHyperlinkElementUtils.pathname")}}
+
これは、最初の '/' とその後に続く URL のパスを含む {{domxref("USVString")}} です。
+
{{domxref("HTMLHyperlinkElementUtils.search")}}
+
これは、'?' とその後に続く URL のパラメーターを含む {{domxref("USVString")}} です。
+
{{domxref("HTMLHyperlinkElementUtils.hash")}}
+
これは、'#' とその後に続く URL のフラグメント識別子を含む {{domxref("USVString")}} です。
+
{{domxref("HTMLHyperlinkElementUtils.username")}}
+
これは、ドメイン名の前に指定されたユーザー名を含む {{domxref("USVString")}} です。
+
{{domxref("HTMLHyperlinkElementUtils.password")}}
+
これは、ドメイン名の前に指定されたパスワードを含む {{domxref("USVString")}} です。
+
{{domxref("HTMLHyperlinkElementUtils.origin")}} {{readonlyInline}}
+
これは、URL のオリジン(スキーム、ドメイン、ポート)を含む {{domxref("USVString")}} を返します。
+
+ +

メソッド

+ +
+

: このインターフェイスはメソッドを継承しません。

+
+ +
+
{{domxref("HTMLHyperlinkElementUtils.toString()")}}
+
これは、URL 全体を含む {{domxref("USVString")}} を返します。 {{domxref("HTMLHyperlinkElementUtils.href")}} の同義語ですが、値を変更するために使用することはできません。
+
+ +

仕様

+ + + + + + + + + + + + + + + + +
仕様状態コメント
{{SpecName('HTML WHATWG', '#htmlhyperlinkelementutils', 'HTMLHyperlinkElementUtils')}}{{Spec2('HTML WHATWG')}}初期定義
+ +

ブラウザーの互換性

+ + + +

{{Compat("api.HTMLHyperlinkElementUtils")}}

+ +

関連情報

+ + diff --git a/files/ja/web/accessibility/aria/widgets/overview/index.html b/files/ja/web/accessibility/aria/widgets/overview/index.html deleted file mode 100644 index c49401a24b..0000000000 --- a/files/ja/web/accessibility/aria/widgets/overview/index.html +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: 概観 -slug: Web/Accessibility/ARIA/widgets/overview -tags: - - Accessibility - - JavaScript - - Landing - - NeedsUpdate -translation_of: Web/Accessibility/ARIA/widgets/overview ---- -
Warning: needs updating
- -

入門

- -

ここでは、動作する例とアクセシブルなJavaScript ウィジェットを作るベストプラクティスを見ていきます。

- -

一般リソース

- - - -

チェックボックス

- - - - - - - -

スライダー

- - - -

タブ

- - - - - - - -

フォーム検証

- - - -

- - diff --git a/files/ja/web/api/document/activeelement/index.html b/files/ja/web/api/document/activeelement/index.html new file mode 100644 index 0000000000..5fe59cbae6 --- /dev/null +++ b/files/ja/web/api/document/activeelement/index.html @@ -0,0 +1,145 @@ +--- +title: document.activeElement +slug: Web/API/DocumentOrShadowRoot/activeElement +tags: + - DOM + - Focus + - Gecko + - HTML5 + - NeedsTranslation + - 要更新 +translation_of: Web/API/DocumentOrShadowRoot/activeElement +translation_of_original: Web/API/Document/activeElement +original_slug: Web/API/Document/activeElement +--- +
{{ApiRef}}
+ +

概要

+ +

Returns the currently focused element, that is, the element that will get keystroke events if the user types any. This attribute is read only.

+ +

Often this will return an {{HTMLElement("input")}} or {{HTMLElement("textarea")}} object, if it has the text selection at the time.  If so, you can get more detail by using the element's selectionStart and selectionEnd properties.  Other times the focused element might be a {{HTMLElement("select")}} element (menu) or an {{HTMLElement("input")}} element, of type button, checkbox or radio.

+ +
注記: On Mac, elements that aren't text input elements tend not to get focus assigned to them.
+ +

Typically a user can press the tab key to move the focus around the page among focusable elements, and use the space bar to activate it (press a button, choose a radio).

+ +

Do not confuse focus with a selection over the document, consisting mostly of static text nodes.  See {{domxref("window.getSelection()")}} for that.

+ +

When there is no selection, the active element is the page's {{HTMLElement("body")}}.

+ +

{{Note("This attribute is part of the in-development HTML 5 specification.")}}

+ +

構文

+ +
var curElement = document.activeElement;
+
+ +

+ +
<!DOCTYPE HTML>
+<html>
+<head>
+    <script type="text/javascript" charset="utf-8">
+    function init() {
+
+        function onMouseUp(e) {
+            console.log(e);
+            var outputElement = document.getElementById('output-element');
+            var outputText = document.getElementById('output-text');
+            var selectedTextArea = document.activeElement;
+            var selection = selectedTextArea.value.substring(
+            selectedTextArea.selectionStart, selectedTextArea.selectionEnd);
+            outputElement.innerHTML = selectedTextArea.id;
+            outputText.innerHTML = selection;
+        }
+
+        document.getElementById("ta-example-one").addEventListener("mouseup", onMouseUp, false);
+        document.getElementById("ta-example-two").addEventListener("mouseup", onMouseUp, false);
+    }
+    </script>
+</head>
+<body onload="init()">
+<div>
+    Select some text from one of the Textareas below:
+</div>
+<form id="frm-example" action="#" accept-charset="utf-8">
+<textarea name="ta-example-one" id="ta-example-one" rows="8" cols="40">
+This is Textarea Example One:
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec tincidunt, lorem a porttitor molestie, odio nibh iaculis libero, et accumsan nunc orci eu dui.
+</textarea>
+<textarea name="ta-example-two" id="ta-example-two" rows="8" cols="40">
+This is Textarea Example Two:
+Fusce ullamcorper, nisl ac porttitor adipiscing, urna orci egestas libero, ut accumsan orci lacus laoreet diam. Morbi sed euismod diam.
+</textarea>
+</form>
+Active Element Id: <span id="output-element"></span><br/>
+Selected Text: <span id="output-text"></span>
+
+</body>
+</html>
+
+ +

JSFiddle で確認

+ +

注記

+ +

Originally introduced as a proprietary DOM extension in Internet Explorer 4, this property also is supported in Opera and Safari (as of version 4).

+ +

仕様

+ + + +

ブラウザ実装状況

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
機能ChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
基本サポート23.049.64.0
+
+ +
+ + + + + + + + + + + + + + + + + + + +
機能AndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
基本サポート{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +

 

diff --git a/files/ja/web/api/documentorshadowroot/activeelement/index.html b/files/ja/web/api/documentorshadowroot/activeelement/index.html deleted file mode 100644 index 5fe59cbae6..0000000000 --- a/files/ja/web/api/documentorshadowroot/activeelement/index.html +++ /dev/null @@ -1,145 +0,0 @@ ---- -title: document.activeElement -slug: Web/API/DocumentOrShadowRoot/activeElement -tags: - - DOM - - Focus - - Gecko - - HTML5 - - NeedsTranslation - - 要更新 -translation_of: Web/API/DocumentOrShadowRoot/activeElement -translation_of_original: Web/API/Document/activeElement -original_slug: Web/API/Document/activeElement ---- -
{{ApiRef}}
- -

概要

- -

Returns the currently focused element, that is, the element that will get keystroke events if the user types any. This attribute is read only.

- -

Often this will return an {{HTMLElement("input")}} or {{HTMLElement("textarea")}} object, if it has the text selection at the time.  If so, you can get more detail by using the element's selectionStart and selectionEnd properties.  Other times the focused element might be a {{HTMLElement("select")}} element (menu) or an {{HTMLElement("input")}} element, of type button, checkbox or radio.

- -
注記: On Mac, elements that aren't text input elements tend not to get focus assigned to them.
- -

Typically a user can press the tab key to move the focus around the page among focusable elements, and use the space bar to activate it (press a button, choose a radio).

- -

Do not confuse focus with a selection over the document, consisting mostly of static text nodes.  See {{domxref("window.getSelection()")}} for that.

- -

When there is no selection, the active element is the page's {{HTMLElement("body")}}.

- -

{{Note("This attribute is part of the in-development HTML 5 specification.")}}

- -

構文

- -
var curElement = document.activeElement;
-
- -

- -
<!DOCTYPE HTML>
-<html>
-<head>
-    <script type="text/javascript" charset="utf-8">
-    function init() {
-
-        function onMouseUp(e) {
-            console.log(e);
-            var outputElement = document.getElementById('output-element');
-            var outputText = document.getElementById('output-text');
-            var selectedTextArea = document.activeElement;
-            var selection = selectedTextArea.value.substring(
-            selectedTextArea.selectionStart, selectedTextArea.selectionEnd);
-            outputElement.innerHTML = selectedTextArea.id;
-            outputText.innerHTML = selection;
-        }
-
-        document.getElementById("ta-example-one").addEventListener("mouseup", onMouseUp, false);
-        document.getElementById("ta-example-two").addEventListener("mouseup", onMouseUp, false);
-    }
-    </script>
-</head>
-<body onload="init()">
-<div>
-    Select some text from one of the Textareas below:
-</div>
-<form id="frm-example" action="#" accept-charset="utf-8">
-<textarea name="ta-example-one" id="ta-example-one" rows="8" cols="40">
-This is Textarea Example One:
-Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec tincidunt, lorem a porttitor molestie, odio nibh iaculis libero, et accumsan nunc orci eu dui.
-</textarea>
-<textarea name="ta-example-two" id="ta-example-two" rows="8" cols="40">
-This is Textarea Example Two:
-Fusce ullamcorper, nisl ac porttitor adipiscing, urna orci egestas libero, ut accumsan orci lacus laoreet diam. Morbi sed euismod diam.
-</textarea>
-</form>
-Active Element Id: <span id="output-element"></span><br/>
-Selected Text: <span id="output-text"></span>
-
-</body>
-</html>
-
- -

JSFiddle で確認

- -

注記

- -

Originally introduced as a proprietary DOM extension in Internet Explorer 4, this property also is supported in Opera and Safari (as of version 4).

- -

仕様

- - - -

ブラウザ実装状況

- -
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - -
機能ChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
基本サポート23.049.64.0
-
- -
- - - - - - - - - - - - - - - - - - - -
機能AndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
基本サポート{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -

 

diff --git a/files/ja/web/api/htmlanchorelement/hash/index.html b/files/ja/web/api/htmlanchorelement/hash/index.html new file mode 100644 index 0000000000..293b73e2f0 --- /dev/null +++ b/files/ja/web/api/htmlanchorelement/hash/index.html @@ -0,0 +1,60 @@ +--- +title: HTMLHyperlinkElementUtils.hash +slug: Web/API/HTMLHyperlinkElementUtils/hash +tags: + - API + - Experimental + - HTMLHyperlinkElementUtils + - Property + - Reference + - URL API +translation_of: Web/API/HTMLHyperlinkElementUtils/hash +--- +
{{ APIRef("URLUtils") }}
+ +

HTMLHyperlinkElementUtils.hash プロパティは、'#' の後に URL のフラグメント識別子が続く {{domxref("USVString")}} を返します。

+ +

フラグメントはパーセントデコードされていません。 URL にフラグメント識別子がない場合、このプロパティには空の文字列 "" が含まれます。

+ +

構文

+ +
string = object.hash;
+object.hash = string;
+
+ +

+ +
<a id="myAnchor" href="/en-US/docs/HTMLHyperlinkElementUtils.href#Examples">Examples</a>
+<script>
+  var anchor = document.getElementById("myAnchor");
+  console.log(anchor.hash); // 戻り値は '#Examples'
+</script>
+ +

仕様

+ + + + + + + + + + + + + + +
仕様状態コメント
{{SpecName('HTML WHATWG', '#dom-hyperlink-hash', 'HTMLHyperlinkElementUtils.hash')}}{{Spec2('HTML WHATWG')}}初期定義
+ +

ブラウザーの互換性

+ + + +

{{Compat("api.HTMLHyperlinkElementUtils.hash")}}

+ +

関連情報

+ + diff --git a/files/ja/web/api/htmlanchorelement/host/index.html b/files/ja/web/api/htmlanchorelement/host/index.html new file mode 100644 index 0000000000..876dd935c1 --- /dev/null +++ b/files/ja/web/api/htmlanchorelement/host/index.html @@ -0,0 +1,65 @@ +--- +title: HTMLHyperlinkElementUtils.host +slug: Web/API/HTMLHyperlinkElementUtils/host +tags: + - API + - Experimental + - HTMLHyperlinkElementUtils + - Property + - Reference + - URL API +translation_of: Web/API/HTMLHyperlinkElementUtils/host +--- +
{{ApiRef("URL API")}}
+ +

HTMLHyperlinkElementUtils.hostプロパティは、ホストを含む {{domxref("USVString")}} です。 ホストは、ホスト名の後に、URL のポートが空でない場合、':'、および URL のポートが続きます。

+ +

構文

+ +
string = object.host;
+object.host = string;
+
+ +

+ +
var anchor = document.createElement("a");
+
+anchor.href = "https://developer.mozilla.org/en-US/HTMLHyperlinkElementUtils.host"
+anchor.host == "developer.mozilla.org"
+
+anchor.href = "https://developer.mozilla.org:443/en-US/HTMLHyperlinkElementUtils.host"
+anchor.host == "developer.mozilla.org"
+// 443 がスキームのデフォルトポートであるため、ポート番号は含まれません
+
+anchor.href = "https://developer.mozilla.org:4097/en-US/HTMLHyperlinkElementUtils.host"
+anchor.host == "developer.mozilla.org:4097"
+
+ +

仕様

+ + + + + + + + + + + + + + +
仕様状態コメント
{{SpecName('HTML WHATWG', '#dom-hyperlink-host', 'HTMLHyperlinkElementUtils.host')}}{{Spec2('HTML WHATWG')}}初期定義
+ +

ブラウザーの互換性

+ + + +

{{Compat("api.HTMLHyperlinkElementUtils.host")}}

+ +

関連情報

+ + diff --git a/files/ja/web/api/htmlanchorelement/hostname/index.html b/files/ja/web/api/htmlanchorelement/hostname/index.html new file mode 100644 index 0000000000..46c38302f1 --- /dev/null +++ b/files/ja/web/api/htmlanchorelement/hostname/index.html @@ -0,0 +1,56 @@ +--- +title: HTMLHyperlinkElementUtils.hostname +slug: Web/API/HTMLHyperlinkElementUtils/hostname +tags: + - API + - Experimental + - HTMLHyperlinkElementUtils + - Property + - Reference + - URL API +translation_of: Web/API/HTMLHyperlinkElementUtils/hostname +--- +

{{ApiRef("URL API")}}

+ +

HTMLHyperlinkElementUtils.hostname プロパティは、URL のドメインを含む {{domxref("USVString")}} です。

+ +

構文

+ +
string = object.hostname;
+object.hostname = string;
+
+ +

+ +
// <a id="myAnchor" href="https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.hostname"> 要素がドキュメントにあるとします
+var anchor = document.getElementByID("myAnchor");
+var result = anchor.hostname; // 戻り値: 'developer.mozilla.org'
+ +

仕様

+ + + + + + + + + + + + + + +
仕様状態コメント
{{SpecName('HTML WHATWG', '#dom-hyperlink-hostname', 'HTMLHyperlinkElementUtils.hostname')}}{{Spec2('HTML WHATWG')}}初期定義
+ +

ブラウザーの互換性

+ + + +

{{Compat("api.HTMLHyperlinkElementUtils.hostname")}}

+ +

関連情報

+ + diff --git a/files/ja/web/api/htmlanchorelement/href/index.html b/files/ja/web/api/htmlanchorelement/href/index.html new file mode 100644 index 0000000000..a371695230 --- /dev/null +++ b/files/ja/web/api/htmlanchorelement/href/index.html @@ -0,0 +1,58 @@ +--- +title: HTMLHyperlinkElementUtils.href +slug: Web/API/HTMLHyperlinkElementUtils/href +tags: + - API + - Experimental + - HTMLHyperlinkElementUtils + - Location + - Property + - Reference + - URL API +translation_of: Web/API/HTMLHyperlinkElementUtils/href +--- +

{{ApiRef("URL API")}}

+ +

HTMLHyperlinkElementUtils.href プロパティは、URL 全体を含む {{domxref("USVString")}} です。

+ +

構文

+ +
string = object.href;
+object.href = string;
+
+ +

+ +
// <a id="myAnchor" href="https://developer.mozilla.org/en-US/HTMLHyperlinkElementUtils/href"> 要素がドキュメントにあるとします
+var anchor = document.getElementById("myAnchor");
+var result = anchor.href; // 戻り値: 'https://developer.mozilla.org/en-US/HTMLHyperlinkElementUtils/href'
+
+ +

仕様

+ + + + + + + + + + + + + + +
仕様状態コメント
{{SpecName('HTML WHATWG', '#dom-hyperlink-href', 'HTMLHyperlinkElementUtils.href')}}{{Spec2('HTML WHATWG')}}初期定義
+ +

ブラウザーの互換性

+ + + +

{{Compat("api.HTMLHyperlinkElementUtils.href")}}

+ +

関連情報

+ + diff --git a/files/ja/web/api/htmlanchorelement/origin/index.html b/files/ja/web/api/htmlanchorelement/origin/index.html new file mode 100644 index 0000000000..8353b66f0a --- /dev/null +++ b/files/ja/web/api/htmlanchorelement/origin/index.html @@ -0,0 +1,64 @@ +--- +title: HTMLHyperlinkElementUtils.origin +slug: Web/API/HTMLHyperlinkElementUtils/origin +tags: + - API + - Experimental + - HTMLHyperlinkElementUtils + - Property + - Read-only + - Reference + - URL API +translation_of: Web/API/HTMLHyperlinkElementUtils/origin +--- +

{{APIRef("URL API")}}

+ +

HTMLHyperlinkElementUtils.origin 読み取り専用プロパティは、表現された URL のオリジンの Unicode シリアル化を含む {{domxref("USVString")}} です。 それは、

+ + + +

{{AvailableInWorkers}}

+ +

構文

+ +
string = object.origin;
+
+ +

+ +
// このページのオリジンを返します
+var result = window.location.origin; // 戻り値: 'https://developer.mozilla.org'
+
+ +

仕様

+ + + + + + + + + + + + + + +
仕様状態コメント
{{SpecName('HTML WHATWG', '#dom-hyperlink-origin', 'HTMLHyperlinkElementUtils.origin')}}{{Spec2('HTML WHATWG')}}初期定義
+ +

ブラウザーの互換性

+ + + +

{{Compat("api.HTMLHyperlinkElementUtils.origin")}}

+ +

関連情報

+ + diff --git a/files/ja/web/api/htmlanchorelement/password/index.html b/files/ja/web/api/htmlanchorelement/password/index.html new file mode 100644 index 0000000000..d973268e54 --- /dev/null +++ b/files/ja/web/api/htmlanchorelement/password/index.html @@ -0,0 +1,58 @@ +--- +title: HTMLHyperlinkElementUtils.password +slug: Web/API/HTMLHyperlinkElementUtils/password +tags: + - API + - Experimental + - HTMLHyperlinkElementUtils + - Property + - URL API +translation_of: Web/API/HTMLHyperlinkElementUtils/password +--- +

{{ApiRef("URL API")}}

+ +

HTMLHyperlinkElementUtils.password プロパティは、ドメイン名の前に指定されたパスワードを含む {{domxref("USVString")}} です。

+ +

最初に username プロパティを設定せずに設定しようとすると、静かに失敗します。

+ +

構文

+ +
string = object.password;
+object.password = string;
+
+ +

+ +
// <a id="myAnchor" href="https://anonymous:flabada@developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.username"> 要素がドキュメントにあるとします
+var anchor = document.getElementByID("myAnchor");
+var result = anchor.password; // 戻り値: 'flabada'
+
+ +

仕様

+ + + + + + + + + + + + + + +
仕様状態コメント
{{SpecName('HTML WHATWG', '#dom-hyperlink-password', 'HTMLHyperlinkElementUtils.password')}}{{Spec2('HTML WHATWG')}}初期定義
+ +

ブラウザーの互換性

+ + + +

{{Compat("api.HTMLHyperlinkElementUtils.password")}}

+ +

関連情報

+ + diff --git a/files/ja/web/api/htmlanchorelement/pathname/index.html b/files/ja/web/api/htmlanchorelement/pathname/index.html new file mode 100644 index 0000000000..a8b227269c --- /dev/null +++ b/files/ja/web/api/htmlanchorelement/pathname/index.html @@ -0,0 +1,57 @@ +--- +title: HTMLHyperlinkElementUtils.pathname +slug: Web/API/HTMLHyperlinkElementUtils/pathname +tags: + - API + - Experimental + - HTMLHyperlinkElementUtils + - Property + - Reference + - URL API +translation_of: Web/API/HTMLHyperlinkElementUtils/pathname +--- +

{{ApiRef("URL API")}}

+ +

HTMLHyperlinkElementUtils.pathname プロパティは、最初の '/' とその後に続く URL のパス(または、パスがない場合は空の文字列)を含む {{domxref("USVString")}} です。

+ +

構文

+ +
string = object.pathname;
+object.pathname = string;
+
+ +

+ +
// <a id="myAnchor" href="https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.pathname"> 要素がドキュメントにあるとします
+var anchor = document.getElementById("myAnchor");
+var result = anchor.pathname; // 戻り値: '/en-US/docs/HTMLHyperlinkElementUtils.pathname'
+
+ +

仕様

+ + + + + + + + + + + + + + +
仕様状態コメント
{{SpecName('HTML WHATWG', '#dom-hyperlink-pathname', 'HTMLHyperlinkElementUtils.pathname')}}{{Spec2('HTML WHATWG')}}初期定義
+ +

ブラウザーの互換性

+ + + +

{{Compat("api.HTMLHyperlinkElementUtils.pathname")}}

+ +

関連情報

+ + diff --git a/files/ja/web/api/htmlanchorelement/port/index.html b/files/ja/web/api/htmlanchorelement/port/index.html new file mode 100644 index 0000000000..a97a28511a --- /dev/null +++ b/files/ja/web/api/htmlanchorelement/port/index.html @@ -0,0 +1,57 @@ +--- +title: HTMLHyperlinkElementUtils.port +slug: Web/API/HTMLHyperlinkElementUtils/port +tags: + - API + - Experimental + - HTMLHyperlinkElementUtils + - Property + - Reference + - URL API +translation_of: Web/API/HTMLHyperlinkElementUtils/port +--- +

{{ApiRef("URL API")}}

+ +

HTMLHyperlinkElementUtils.port プロパティは、URL のポート番号を含む {{domxref("USVString")}} です。 URL に明示的なポート番号が含まれていない場合は、'' に設定されます。

+ +

構文

+ +
string = object.port;
+object.port = string;
+
+ +

+ +
// <a id="myAnchor" href="https://developer.mozilla.org:443/en-US/docs/HTMLHyperlinkElementUtils.port"> 要素がドキュメントにあるとします
+var anchor = document.getElementByID("myAnchor");
+var result = anchor.port; // 戻り値: '443'
+
+ +

仕様

+ + + + + + + + + + + + + + +
仕様状態コメント
{{SpecName('HTML WHATWG', '#dom-hyperlink-port', 'HTMLHyperlinkElementUtils.port')}}{{Spec2('HTML WHATWG')}}初期定義
+ +

ブラウザーの互換性

+ + + +

{{Compat("api.HTMLHyperlinkElementUtils.port")}}

+ +

関連情報

+ + diff --git a/files/ja/web/api/htmlanchorelement/protocol/index.html b/files/ja/web/api/htmlanchorelement/protocol/index.html new file mode 100644 index 0000000000..9b800001ea --- /dev/null +++ b/files/ja/web/api/htmlanchorelement/protocol/index.html @@ -0,0 +1,56 @@ +--- +title: HTMLHyperlinkElementUtils.protocol +slug: Web/API/HTMLHyperlinkElementUtils/protocol +tags: + - API + - Experimental + - HTMLHyperlinkElementUtils + - Property + - URL API +translation_of: Web/API/HTMLHyperlinkElementUtils/protocol +--- +

{{ApiRef("URL API")}}

+ +

HTMLHyperlinkElementUtils.protocol プロパティは、最後の ':' を含む URL のプロトコルスキームを表す {{domxref("USVString")}} です。

+ +

構文

+ +
string = object.protocol;
+object.protocol = string;
+
+ +

+ +
// <a id="myAnchor" href="https://developer.mozilla.org/en-US/HTMLHyperlinkElementUtils.protocol"> 要素がドキュメントにあるとします
+var anchor = document.getElementById("myAnchor");
+var result = anchor.protocol; // 戻り値: 'https:'
+
+ +

仕様

+ + + + + + + + + + + + + + +
仕様状態コメント
{{SpecName('HTML WHATWG', '#dom-hyperlink-protocol', 'HTMLHyperlinkElementUtils.protocol')}}{{Spec2('HTML WHATWG')}}初期定義
+ +

ブラウザーの互換性

+ + + +

{{Compat("api.HTMLHyperlinkElementUtils.protocol")}}

+ +

関連情報

+ + diff --git a/files/ja/web/api/htmlanchorelement/search/index.html b/files/ja/web/api/htmlanchorelement/search/index.html new file mode 100644 index 0000000000..3d09ac6610 --- /dev/null +++ b/files/ja/web/api/htmlanchorelement/search/index.html @@ -0,0 +1,63 @@ +--- +title: HTMLHyperlinkElementUtils.search +slug: Web/API/HTMLHyperlinkElementUtils/search +tags: + - API + - Experimental + - HTMLHyperlinkElementUtils + - Property + - Reference + - URL API +translation_of: Web/API/HTMLHyperlinkElementUtils/search +--- +
{{ApiRef("URL API")}}
+ +

HTMLHyperlinkElementUtils.search プロパティは、クエリー文字列とも呼ばれる検索文字列、つまり '?' とその後に続く URL のパラメーターを含む {{domxref("USVString")}} です。

+ +

最新のブラウザーでは、URLSearchParamsURL.searchParams を提供して、クエリー文字列からパラメーターを簡単に解析できるようにしています。

+ +

構文

+ +
string = object.search;
+object.search = string;
+
+ +

+ +
//  <a id="myAnchor" href="https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.search?q=123"> 要素がドキュメントにあるとします
+var anchor = document.getElementById("myAnchor");
+var queryString = anchor.search; // 戻り値: '?q=123'
+
+// Further parsing:
+let params = new URLSearchParams(queryString);
+let q = parseInt(params.get("q") // 数値の 123 です
+
+ +

仕様

+ + + + + + + + + + + + + + +
仕様状態コメント
{{SpecName('HTML WHATWG', '#dom-hyperlink-search', 'HTMLHyperlinkElementUtils.search')}}{{Spec2('HTML WHATWG')}}初期定義
+ +

ブラウザーの互換性

+ + + +

{{Compat("api.HTMLHyperlinkElementUtils.search")}}

+ +

関連情報

+ + diff --git a/files/ja/web/api/htmlanchorelement/tostring/index.html b/files/ja/web/api/htmlanchorelement/tostring/index.html new file mode 100644 index 0000000000..1edb61e862 --- /dev/null +++ b/files/ja/web/api/htmlanchorelement/tostring/index.html @@ -0,0 +1,39 @@ +--- +title: HTMLHyperlinkElementUtils.toString() +slug: Web/API/HTMLHyperlinkElementUtils/toString +tags: + - API + - Experimental + - HTMLHyperlinkElementUtils + - Location + - Method + - Stringifier + - URL API +translation_of: Web/API/HTMLHyperlinkElementUtils/toString +--- +

{{ApiRef("URL API")}}

+ +

HTMLHyperlinkElementUtils.toString() 文字列化メソッドは、URL 全体を含む {{domxref("USVString")}} を返します。 これは、{{domxref("HTMLHyperlinkElementUtils.href")}} の読み取り専用バージョンです。

+ +

構文

+ +
string = object.toString();
+ +

+ +
// <a id="myAnchor" href="https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils/toString"> 要素がドキュメントにあるとします
+var anchor = document.getElementById("myAnchor");
+var result = anchor.toString(); // 戻り値: 'https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils/toString'
+
+ +

ブラウザーの互換性

+ + + +

{{Compat("api.HTMLHyperlinkElementUtils.toString")}}

+ +

関連情報

+ + diff --git a/files/ja/web/api/htmlanchorelement/username/index.html b/files/ja/web/api/htmlanchorelement/username/index.html new file mode 100644 index 0000000000..2bda58e2d2 --- /dev/null +++ b/files/ja/web/api/htmlanchorelement/username/index.html @@ -0,0 +1,57 @@ +--- +title: HTMLHyperlinkElementUtils.username +slug: Web/API/HTMLHyperlinkElementUtils/username +tags: + - API + - Experimental + - HTMLHyperlinkElementUtils + - Property + - Reference + - URL API +translation_of: Web/API/HTMLHyperlinkElementUtils/username +--- +

{{ApiRef("URL API")}}

+ +

HTMLHyperlinkElementUtils.username プロパティは、ドメイン名の前に指定されたユーザー名を含む {{domxref("USVString")}} です。

+ +

構文

+ +
string = object.username;
+object.username = string;
+
+ +

+ +
// <a id="myAnchor" href="https://anonymous:flabada@developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.username"> 要素がドキュメントにあるとします
+var anchor = document.getElementByID("myAnchor");
+var result = anchor.username; // 戻り値: 'anonymous'
+
+ +

仕様

+ + + + + + + + + + + + + + +
仕様状態コメント
{{SpecName('HTML WHATWG', '#dom-hyperlink-username', 'HTMLHyperlinkElementUtils.username')}}{{Spec2('HTML WHATWG')}}初期定義
+ +

ブラウザーの互換性

+ + + +

{{Compat("api.HTMLHyperlinkElementUtils.username")}}

+ +

関連情報

+ + diff --git a/files/ja/web/api/htmlhyperlinkelementutils/hash/index.html b/files/ja/web/api/htmlhyperlinkelementutils/hash/index.html deleted file mode 100644 index 293b73e2f0..0000000000 --- a/files/ja/web/api/htmlhyperlinkelementutils/hash/index.html +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.hash -slug: Web/API/HTMLHyperlinkElementUtils/hash -tags: - - API - - Experimental - - HTMLHyperlinkElementUtils - - Property - - Reference - - URL API -translation_of: Web/API/HTMLHyperlinkElementUtils/hash ---- -
{{ APIRef("URLUtils") }}
- -

HTMLHyperlinkElementUtils.hash プロパティは、'#' の後に URL のフラグメント識別子が続く {{domxref("USVString")}} を返します。

- -

フラグメントはパーセントデコードされていません。 URL にフラグメント識別子がない場合、このプロパティには空の文字列 "" が含まれます。

- -

構文

- -
string = object.hash;
-object.hash = string;
-
- -

- -
<a id="myAnchor" href="/en-US/docs/HTMLHyperlinkElementUtils.href#Examples">Examples</a>
-<script>
-  var anchor = document.getElementById("myAnchor");
-  console.log(anchor.hash); // 戻り値は '#Examples'
-</script>
- -

仕様

- - - - - - - - - - - - - - -
仕様状態コメント
{{SpecName('HTML WHATWG', '#dom-hyperlink-hash', 'HTMLHyperlinkElementUtils.hash')}}{{Spec2('HTML WHATWG')}}初期定義
- -

ブラウザーの互換性

- - - -

{{Compat("api.HTMLHyperlinkElementUtils.hash")}}

- -

関連情報

- - diff --git a/files/ja/web/api/htmlhyperlinkelementutils/host/index.html b/files/ja/web/api/htmlhyperlinkelementutils/host/index.html deleted file mode 100644 index 876dd935c1..0000000000 --- a/files/ja/web/api/htmlhyperlinkelementutils/host/index.html +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.host -slug: Web/API/HTMLHyperlinkElementUtils/host -tags: - - API - - Experimental - - HTMLHyperlinkElementUtils - - Property - - Reference - - URL API -translation_of: Web/API/HTMLHyperlinkElementUtils/host ---- -
{{ApiRef("URL API")}}
- -

HTMLHyperlinkElementUtils.hostプロパティは、ホストを含む {{domxref("USVString")}} です。 ホストは、ホスト名の後に、URL のポートが空でない場合、':'、および URL のポートが続きます。

- -

構文

- -
string = object.host;
-object.host = string;
-
- -

- -
var anchor = document.createElement("a");
-
-anchor.href = "https://developer.mozilla.org/en-US/HTMLHyperlinkElementUtils.host"
-anchor.host == "developer.mozilla.org"
-
-anchor.href = "https://developer.mozilla.org:443/en-US/HTMLHyperlinkElementUtils.host"
-anchor.host == "developer.mozilla.org"
-// 443 がスキームのデフォルトポートであるため、ポート番号は含まれません
-
-anchor.href = "https://developer.mozilla.org:4097/en-US/HTMLHyperlinkElementUtils.host"
-anchor.host == "developer.mozilla.org:4097"
-
- -

仕様

- - - - - - - - - - - - - - -
仕様状態コメント
{{SpecName('HTML WHATWG', '#dom-hyperlink-host', 'HTMLHyperlinkElementUtils.host')}}{{Spec2('HTML WHATWG')}}初期定義
- -

ブラウザーの互換性

- - - -

{{Compat("api.HTMLHyperlinkElementUtils.host")}}

- -

関連情報

- - diff --git a/files/ja/web/api/htmlhyperlinkelementutils/hostname/index.html b/files/ja/web/api/htmlhyperlinkelementutils/hostname/index.html deleted file mode 100644 index 46c38302f1..0000000000 --- a/files/ja/web/api/htmlhyperlinkelementutils/hostname/index.html +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.hostname -slug: Web/API/HTMLHyperlinkElementUtils/hostname -tags: - - API - - Experimental - - HTMLHyperlinkElementUtils - - Property - - Reference - - URL API -translation_of: Web/API/HTMLHyperlinkElementUtils/hostname ---- -

{{ApiRef("URL API")}}

- -

HTMLHyperlinkElementUtils.hostname プロパティは、URL のドメインを含む {{domxref("USVString")}} です。

- -

構文

- -
string = object.hostname;
-object.hostname = string;
-
- -

- -
// <a id="myAnchor" href="https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.hostname"> 要素がドキュメントにあるとします
-var anchor = document.getElementByID("myAnchor");
-var result = anchor.hostname; // 戻り値: 'developer.mozilla.org'
- -

仕様

- - - - - - - - - - - - - - -
仕様状態コメント
{{SpecName('HTML WHATWG', '#dom-hyperlink-hostname', 'HTMLHyperlinkElementUtils.hostname')}}{{Spec2('HTML WHATWG')}}初期定義
- -

ブラウザーの互換性

- - - -

{{Compat("api.HTMLHyperlinkElementUtils.hostname")}}

- -

関連情報

- - diff --git a/files/ja/web/api/htmlhyperlinkelementutils/href/index.html b/files/ja/web/api/htmlhyperlinkelementutils/href/index.html deleted file mode 100644 index a371695230..0000000000 --- a/files/ja/web/api/htmlhyperlinkelementutils/href/index.html +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.href -slug: Web/API/HTMLHyperlinkElementUtils/href -tags: - - API - - Experimental - - HTMLHyperlinkElementUtils - - Location - - Property - - Reference - - URL API -translation_of: Web/API/HTMLHyperlinkElementUtils/href ---- -

{{ApiRef("URL API")}}

- -

HTMLHyperlinkElementUtils.href プロパティは、URL 全体を含む {{domxref("USVString")}} です。

- -

構文

- -
string = object.href;
-object.href = string;
-
- -

- -
// <a id="myAnchor" href="https://developer.mozilla.org/en-US/HTMLHyperlinkElementUtils/href"> 要素がドキュメントにあるとします
-var anchor = document.getElementById("myAnchor");
-var result = anchor.href; // 戻り値: 'https://developer.mozilla.org/en-US/HTMLHyperlinkElementUtils/href'
-
- -

仕様

- - - - - - - - - - - - - - -
仕様状態コメント
{{SpecName('HTML WHATWG', '#dom-hyperlink-href', 'HTMLHyperlinkElementUtils.href')}}{{Spec2('HTML WHATWG')}}初期定義
- -

ブラウザーの互換性

- - - -

{{Compat("api.HTMLHyperlinkElementUtils.href")}}

- -

関連情報

- - diff --git a/files/ja/web/api/htmlhyperlinkelementutils/index.html b/files/ja/web/api/htmlhyperlinkelementutils/index.html deleted file mode 100644 index bc0b1f182a..0000000000 --- a/files/ja/web/api/htmlhyperlinkelementutils/index.html +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils -slug: Web/API/HTMLHyperlinkElementUtils -tags: - - API - - Experimental - - Mixin - - URL API -translation_of: Web/API/HTMLHyperlinkElementUtils ---- -

{{ApiRef("URL API")}}{{SeeCompatTable}}

- -

HTMLHyperlinkElementUtils ミックスインは、{{domxref("HTMLAnchorElement")}} および {{domxref("HTMLAreaElement")}} と連携するユーティリティのメソッドとプロパティを定義します。 これらのユーティリティを使用すると、URL などの一般的な機能を処理できます。

- -

このタイプのオブジェクトはありませんが、いくつかのオブジェクトの {{domxref("HTMLAnchorElement")}} および {{domxref("HTMLAreaElement")}} がそれを実装しています。

- -

プロパティ

- -
-

: このインターフェイスはプロパティを継承しません。

-
- -
-
{{domxref("HTMLHyperlinkElementUtils.href")}}
-
これは、URL 全体を含む {{domxref("USVString")}} です。
-
{{domxref("HTMLHyperlinkElementUtils.protocol")}}
-
これは、最後の ':' を含む URL のプロトコルスキームを含む {{domxref("USVString")}} です。
-
{{domxref("HTMLHyperlinkElementUtils.host")}}
-
これは、ホストを含む {{domxref("USVString")}} です。 ホストは、ホスト名の後に、URL のポートが空でない場合、':'、および URL のポートが続きます(空は、指定されていないか、URL のスキームのデフォルトポートとして指定されているために発生する可能性があります)。
-
{{domxref("HTMLHyperlinkElementUtils.hostname")}}
-
これは、URL のドメイン(ホスト名)を含む {{domxref("USVString")}} です。
-
{{domxref("HTMLHyperlinkElementUtils.port")}}
-
これは、URL のポート番号を含む {{domxref("USVString")}} です。
-
{{domxref("HTMLHyperlinkElementUtils.pathname")}}
-
これは、最初の '/' とその後に続く URL のパスを含む {{domxref("USVString")}} です。
-
{{domxref("HTMLHyperlinkElementUtils.search")}}
-
これは、'?' とその後に続く URL のパラメーターを含む {{domxref("USVString")}} です。
-
{{domxref("HTMLHyperlinkElementUtils.hash")}}
-
これは、'#' とその後に続く URL のフラグメント識別子を含む {{domxref("USVString")}} です。
-
{{domxref("HTMLHyperlinkElementUtils.username")}}
-
これは、ドメイン名の前に指定されたユーザー名を含む {{domxref("USVString")}} です。
-
{{domxref("HTMLHyperlinkElementUtils.password")}}
-
これは、ドメイン名の前に指定されたパスワードを含む {{domxref("USVString")}} です。
-
{{domxref("HTMLHyperlinkElementUtils.origin")}} {{readonlyInline}}
-
これは、URL のオリジン(スキーム、ドメイン、ポート)を含む {{domxref("USVString")}} を返します。
-
- -

メソッド

- -
-

: このインターフェイスはメソッドを継承しません。

-
- -
-
{{domxref("HTMLHyperlinkElementUtils.toString()")}}
-
これは、URL 全体を含む {{domxref("USVString")}} を返します。 {{domxref("HTMLHyperlinkElementUtils.href")}} の同義語ですが、値を変更するために使用することはできません。
-
- -

仕様

- - - - - - - - - - - - - - - - -
仕様状態コメント
{{SpecName('HTML WHATWG', '#htmlhyperlinkelementutils', 'HTMLHyperlinkElementUtils')}}{{Spec2('HTML WHATWG')}}初期定義
- -

ブラウザーの互換性

- - - -

{{Compat("api.HTMLHyperlinkElementUtils")}}

- -

関連情報

- - diff --git a/files/ja/web/api/htmlhyperlinkelementutils/origin/index.html b/files/ja/web/api/htmlhyperlinkelementutils/origin/index.html deleted file mode 100644 index 8353b66f0a..0000000000 --- a/files/ja/web/api/htmlhyperlinkelementutils/origin/index.html +++ /dev/null @@ -1,64 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.origin -slug: Web/API/HTMLHyperlinkElementUtils/origin -tags: - - API - - Experimental - - HTMLHyperlinkElementUtils - - Property - - Read-only - - Reference - - URL API -translation_of: Web/API/HTMLHyperlinkElementUtils/origin ---- -

{{APIRef("URL API")}}

- -

HTMLHyperlinkElementUtils.origin 読み取り専用プロパティは、表現された URL のオリジンの Unicode シリアル化を含む {{domxref("USVString")}} です。 それは、

- - - -

{{AvailableInWorkers}}

- -

構文

- -
string = object.origin;
-
- -

- -
// このページのオリジンを返します
-var result = window.location.origin; // 戻り値: 'https://developer.mozilla.org'
-
- -

仕様

- - - - - - - - - - - - - - -
仕様状態コメント
{{SpecName('HTML WHATWG', '#dom-hyperlink-origin', 'HTMLHyperlinkElementUtils.origin')}}{{Spec2('HTML WHATWG')}}初期定義
- -

ブラウザーの互換性

- - - -

{{Compat("api.HTMLHyperlinkElementUtils.origin")}}

- -

関連情報

- - diff --git a/files/ja/web/api/htmlhyperlinkelementutils/password/index.html b/files/ja/web/api/htmlhyperlinkelementutils/password/index.html deleted file mode 100644 index d973268e54..0000000000 --- a/files/ja/web/api/htmlhyperlinkelementutils/password/index.html +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.password -slug: Web/API/HTMLHyperlinkElementUtils/password -tags: - - API - - Experimental - - HTMLHyperlinkElementUtils - - Property - - URL API -translation_of: Web/API/HTMLHyperlinkElementUtils/password ---- -

{{ApiRef("URL API")}}

- -

HTMLHyperlinkElementUtils.password プロパティは、ドメイン名の前に指定されたパスワードを含む {{domxref("USVString")}} です。

- -

最初に username プロパティを設定せずに設定しようとすると、静かに失敗します。

- -

構文

- -
string = object.password;
-object.password = string;
-
- -

- -
// <a id="myAnchor" href="https://anonymous:flabada@developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.username"> 要素がドキュメントにあるとします
-var anchor = document.getElementByID("myAnchor");
-var result = anchor.password; // 戻り値: 'flabada'
-
- -

仕様

- - - - - - - - - - - - - - -
仕様状態コメント
{{SpecName('HTML WHATWG', '#dom-hyperlink-password', 'HTMLHyperlinkElementUtils.password')}}{{Spec2('HTML WHATWG')}}初期定義
- -

ブラウザーの互換性

- - - -

{{Compat("api.HTMLHyperlinkElementUtils.password")}}

- -

関連情報

- - diff --git a/files/ja/web/api/htmlhyperlinkelementutils/pathname/index.html b/files/ja/web/api/htmlhyperlinkelementutils/pathname/index.html deleted file mode 100644 index a8b227269c..0000000000 --- a/files/ja/web/api/htmlhyperlinkelementutils/pathname/index.html +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.pathname -slug: Web/API/HTMLHyperlinkElementUtils/pathname -tags: - - API - - Experimental - - HTMLHyperlinkElementUtils - - Property - - Reference - - URL API -translation_of: Web/API/HTMLHyperlinkElementUtils/pathname ---- -

{{ApiRef("URL API")}}

- -

HTMLHyperlinkElementUtils.pathname プロパティは、最初の '/' とその後に続く URL のパス(または、パスがない場合は空の文字列)を含む {{domxref("USVString")}} です。

- -

構文

- -
string = object.pathname;
-object.pathname = string;
-
- -

- -
// <a id="myAnchor" href="https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.pathname"> 要素がドキュメントにあるとします
-var anchor = document.getElementById("myAnchor");
-var result = anchor.pathname; // 戻り値: '/en-US/docs/HTMLHyperlinkElementUtils.pathname'
-
- -

仕様

- - - - - - - - - - - - - - -
仕様状態コメント
{{SpecName('HTML WHATWG', '#dom-hyperlink-pathname', 'HTMLHyperlinkElementUtils.pathname')}}{{Spec2('HTML WHATWG')}}初期定義
- -

ブラウザーの互換性

- - - -

{{Compat("api.HTMLHyperlinkElementUtils.pathname")}}

- -

関連情報

- - diff --git a/files/ja/web/api/htmlhyperlinkelementutils/port/index.html b/files/ja/web/api/htmlhyperlinkelementutils/port/index.html deleted file mode 100644 index a97a28511a..0000000000 --- a/files/ja/web/api/htmlhyperlinkelementutils/port/index.html +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.port -slug: Web/API/HTMLHyperlinkElementUtils/port -tags: - - API - - Experimental - - HTMLHyperlinkElementUtils - - Property - - Reference - - URL API -translation_of: Web/API/HTMLHyperlinkElementUtils/port ---- -

{{ApiRef("URL API")}}

- -

HTMLHyperlinkElementUtils.port プロパティは、URL のポート番号を含む {{domxref("USVString")}} です。 URL に明示的なポート番号が含まれていない場合は、'' に設定されます。

- -

構文

- -
string = object.port;
-object.port = string;
-
- -

- -
// <a id="myAnchor" href="https://developer.mozilla.org:443/en-US/docs/HTMLHyperlinkElementUtils.port"> 要素がドキュメントにあるとします
-var anchor = document.getElementByID("myAnchor");
-var result = anchor.port; // 戻り値: '443'
-
- -

仕様

- - - - - - - - - - - - - - -
仕様状態コメント
{{SpecName('HTML WHATWG', '#dom-hyperlink-port', 'HTMLHyperlinkElementUtils.port')}}{{Spec2('HTML WHATWG')}}初期定義
- -

ブラウザーの互換性

- - - -

{{Compat("api.HTMLHyperlinkElementUtils.port")}}

- -

関連情報

- - diff --git a/files/ja/web/api/htmlhyperlinkelementutils/protocol/index.html b/files/ja/web/api/htmlhyperlinkelementutils/protocol/index.html deleted file mode 100644 index 9b800001ea..0000000000 --- a/files/ja/web/api/htmlhyperlinkelementutils/protocol/index.html +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.protocol -slug: Web/API/HTMLHyperlinkElementUtils/protocol -tags: - - API - - Experimental - - HTMLHyperlinkElementUtils - - Property - - URL API -translation_of: Web/API/HTMLHyperlinkElementUtils/protocol ---- -

{{ApiRef("URL API")}}

- -

HTMLHyperlinkElementUtils.protocol プロパティは、最後の ':' を含む URL のプロトコルスキームを表す {{domxref("USVString")}} です。

- -

構文

- -
string = object.protocol;
-object.protocol = string;
-
- -

- -
// <a id="myAnchor" href="https://developer.mozilla.org/en-US/HTMLHyperlinkElementUtils.protocol"> 要素がドキュメントにあるとします
-var anchor = document.getElementById("myAnchor");
-var result = anchor.protocol; // 戻り値: 'https:'
-
- -

仕様

- - - - - - - - - - - - - - -
仕様状態コメント
{{SpecName('HTML WHATWG', '#dom-hyperlink-protocol', 'HTMLHyperlinkElementUtils.protocol')}}{{Spec2('HTML WHATWG')}}初期定義
- -

ブラウザーの互換性

- - - -

{{Compat("api.HTMLHyperlinkElementUtils.protocol")}}

- -

関連情報

- - diff --git a/files/ja/web/api/htmlhyperlinkelementutils/search/index.html b/files/ja/web/api/htmlhyperlinkelementutils/search/index.html deleted file mode 100644 index 3d09ac6610..0000000000 --- a/files/ja/web/api/htmlhyperlinkelementutils/search/index.html +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.search -slug: Web/API/HTMLHyperlinkElementUtils/search -tags: - - API - - Experimental - - HTMLHyperlinkElementUtils - - Property - - Reference - - URL API -translation_of: Web/API/HTMLHyperlinkElementUtils/search ---- -
{{ApiRef("URL API")}}
- -

HTMLHyperlinkElementUtils.search プロパティは、クエリー文字列とも呼ばれる検索文字列、つまり '?' とその後に続く URL のパラメーターを含む {{domxref("USVString")}} です。

- -

最新のブラウザーでは、URLSearchParamsURL.searchParams を提供して、クエリー文字列からパラメーターを簡単に解析できるようにしています。

- -

構文

- -
string = object.search;
-object.search = string;
-
- -

- -
//  <a id="myAnchor" href="https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.search?q=123"> 要素がドキュメントにあるとします
-var anchor = document.getElementById("myAnchor");
-var queryString = anchor.search; // 戻り値: '?q=123'
-
-// Further parsing:
-let params = new URLSearchParams(queryString);
-let q = parseInt(params.get("q") // 数値の 123 です
-
- -

仕様

- - - - - - - - - - - - - - -
仕様状態コメント
{{SpecName('HTML WHATWG', '#dom-hyperlink-search', 'HTMLHyperlinkElementUtils.search')}}{{Spec2('HTML WHATWG')}}初期定義
- -

ブラウザーの互換性

- - - -

{{Compat("api.HTMLHyperlinkElementUtils.search")}}

- -

関連情報

- - diff --git a/files/ja/web/api/htmlhyperlinkelementutils/tostring/index.html b/files/ja/web/api/htmlhyperlinkelementutils/tostring/index.html deleted file mode 100644 index 1edb61e862..0000000000 --- a/files/ja/web/api/htmlhyperlinkelementutils/tostring/index.html +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.toString() -slug: Web/API/HTMLHyperlinkElementUtils/toString -tags: - - API - - Experimental - - HTMLHyperlinkElementUtils - - Location - - Method - - Stringifier - - URL API -translation_of: Web/API/HTMLHyperlinkElementUtils/toString ---- -

{{ApiRef("URL API")}}

- -

HTMLHyperlinkElementUtils.toString() 文字列化メソッドは、URL 全体を含む {{domxref("USVString")}} を返します。 これは、{{domxref("HTMLHyperlinkElementUtils.href")}} の読み取り専用バージョンです。

- -

構文

- -
string = object.toString();
- -

- -
// <a id="myAnchor" href="https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils/toString"> 要素がドキュメントにあるとします
-var anchor = document.getElementById("myAnchor");
-var result = anchor.toString(); // 戻り値: 'https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils/toString'
-
- -

ブラウザーの互換性

- - - -

{{Compat("api.HTMLHyperlinkElementUtils.toString")}}

- -

関連情報

- - diff --git a/files/ja/web/api/htmlhyperlinkelementutils/username/index.html b/files/ja/web/api/htmlhyperlinkelementutils/username/index.html deleted file mode 100644 index 2bda58e2d2..0000000000 --- a/files/ja/web/api/htmlhyperlinkelementutils/username/index.html +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.username -slug: Web/API/HTMLHyperlinkElementUtils/username -tags: - - API - - Experimental - - HTMLHyperlinkElementUtils - - Property - - Reference - - URL API -translation_of: Web/API/HTMLHyperlinkElementUtils/username ---- -

{{ApiRef("URL API")}}

- -

HTMLHyperlinkElementUtils.username プロパティは、ドメイン名の前に指定されたユーザー名を含む {{domxref("USVString")}} です。

- -

構文

- -
string = object.username;
-object.username = string;
-
- -

- -
// <a id="myAnchor" href="https://anonymous:flabada@developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.username"> 要素がドキュメントにあるとします
-var anchor = document.getElementByID("myAnchor");
-var result = anchor.username; // 戻り値: 'anonymous'
-
- -

仕様

- - - - - - - - - - - - - - -
仕様状態コメント
{{SpecName('HTML WHATWG', '#dom-hyperlink-username', 'HTMLHyperlinkElementUtils.username')}}{{Spec2('HTML WHATWG')}}初期定義
- -

ブラウザーの互換性

- - - -

{{Compat("api.HTMLHyperlinkElementUtils.username")}}

- -

関連情報

- - diff --git a/files/ja/web/api/nondocumenttypechildnode/index.html b/files/ja/web/api/nondocumenttypechildnode/index.html deleted file mode 100644 index 2115525343..0000000000 --- a/files/ja/web/api/nondocumenttypechildnode/index.html +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: NonDocumentTypeChildNode -slug: Web/API/NonDocumentTypeChildNode -tags: - - API - - DOM - - Interface - - NonDocumentTypeChildNode - - Reference -translation_of: Web/API/NonDocumentTypeChildNode ---- -
{{APIRef("DOM")}}
- -

NonDocumentTypeChildNode インターフェイスは親を持つ {{domxref("Node")}} オブジェクトに固有な、{{domxref("DocumentType")}} に適していないメソッドを含みます。

- -

NonDocumentTypeChildNode は純粋なインターフェースで、この型のオブジェクトを作ることはできません。 {{domxref("Element")}}、{{domxref("CharacterData")}} オブジェクトで実装されています。

- -

プロパティ

- -

継承されたプロパティはありません。

- -
-
{{domxref("NonDocumentTypeChildNode.previousElementSibling")}} {{readonlyInline}}
-
このノードの親ノードの子リスト内にある、このノードの直前にある {{domxref("Element")}} を返します。リスト内でこのノードの前に {{domxref("Element")}} がない場合は null を返します。
-
{{domxref("NonDocumentTypeChildNode.nextElementSibling")}} {{readonlyInline}}
-
このノードの親ノードの子リスト内にある、このノードの直後にある {{domxref("Element")}} を返します。リスト内でこのノードの後に {{domxref("Element")}} がない場合は null を返します。
-
- -

メソッド

- -

継承、および実装されたメソッドはありません。

- -

仕様

- - - - - - - - - - - - - - - - - - - -
仕様書策定状況コメント
{{SpecName('DOM WHATWG', '#interface-nondocumenttypechildnode', 'NonDocumentTypeChildNode')}}{{Spec2('DOM WHATWG')}}ElementTraversal インタフェースを{{domxref("ParentNode")}}、{{domxref("ChildNode")}}、NonDocumentTypeChildNode に分割しました。後者では previousElementSiblingnextElementSibling が定義されるようになりました。
- {{domxref("CharacterData")}} と {{domxref("Element")}} は、新しいインタフェースを実装しました。
{{SpecName('Element Traversal', '#interface-elementTraversal', 'ElementTraversal')}}{{Spec2('Element Traversal')}}ElementTraversal 基本インターフェースにプロパティの初期定義を追加し、{{domxref("Element")}} で使用できるようにしました。.
- -

ブラウザー実装状況

- - - -

{{Compat("api.NonDocumentTypeChildNode")}}

- -

関連情報

- - diff --git a/files/ko/orphaned/web/api/htmlhyperlinkelementutils/index.html b/files/ko/orphaned/web/api/htmlhyperlinkelementutils/index.html new file mode 100644 index 0000000000..cd82725dbf --- /dev/null +++ b/files/ko/orphaned/web/api/htmlhyperlinkelementutils/index.html @@ -0,0 +1,91 @@ +--- +title: HTMLHyperlinkElementUtils +slug: Web/API/HTMLHyperlinkElementUtils +tags: + - API + - Experimental + - Mixin + - NeedsTranslation + - TopicStub + - URL API +translation_of: Web/API/HTMLHyperlinkElementUtils +--- +

{{ApiRef("URL API")}}{{SeeCompatTable}}

+ +

The HTMLHyperlinkElementUtils mixin defines utility methods and properties to work with {{domxref("HTMLAnchorElement")}} and {{domxref("HTMLAreaElement")}}. These utilities allow to deal with common features like URLs.

+ +

There are no objects of this type, but several objects {{domxref("HTMLAnchorElement")}} and {{domxref("HTMLAreaElement")}} implement it.

+ +

Properties

+ +
+

Note: This interface doesn't inherit any property.

+
+ +
+
{{domxref("HTMLHyperlinkElementUtils.href")}}
+
This is a {{domxref("USVString")}} containing the whole URL.
+
{{domxref("HTMLHyperlinkElementUtils.protocol")}}
+
This is a {{domxref("USVString")}} containing the protocol scheme of the URL, including the final ':'.
+
{{domxref("HTMLHyperlinkElementUtils.host")}}
+
This is a {{domxref("USVString")}} containing the host, that is the hostname, and then, if the port of the URL is not empty (which can happen because it was not specified or because it was specified to be the default port of the URL's scheme), a ':', and the port of the URL.
+
{{domxref("HTMLHyperlinkElementUtils.hostname")}}
+
This is a {{domxref("USVString")}} containing the domain of the URL.
+
{{domxref("HTMLHyperlinkElementUtils.port")}}
+
This is a {{domxref("USVString")}} containing the port number of the URL.
+
{{domxref("HTMLHyperlinkElementUtils.pathname")}}
+
This is a {{domxref("USVString")}} containing an initial '/' followed by the path of the URL.
+
{{domxref("HTMLHyperlinkElementUtils.search")}}
+
This is a {{domxref("USVString")}} containing a '?' followed by the parameters of the URL.
+
{{domxref("HTMLHyperlinkElementUtils.hash")}}
+
This is a {{domxref("USVString")}} containing a '#' followed by the fragment identifier of the URL.
+
{{domxref("HTMLHyperlinkElementUtils.username")}}
+
This is a {{domxref("USVString")}} containing the username specified before the domain name.
+
{{domxref("HTMLHyperlinkElementUtils.password")}}
+
This is a {{domxref("USVString")}} containing the password specified before the domain name.
+
{{domxref("HTMLHyperlinkElementUtils.origin")}} {{readonlyInline}}
+
This returns a {{domxref("USVString")}} containing the origin of the URL (that is its scheme, its domain and its port).
+
+ +

Methods

+ +
+

Note: This interface doesn't inherit any method.

+
+ +
+
{{domxref("HTMLHyperlinkElementUtils.toString()")}}
+
This returns a {{domxref("DOMString")}} containing the whole URL. It is a synonym for {{domxref("HTMLHyperlinkElementUtils.href")}}, though it can't be used to modify the value.
+
+ +

Specifications

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', '#htmlhyperlinkelementutils', 'HTMLHyperlinkElementUtils')}}{{Spec2('HTML WHATWG')}}Initial definition
+ +

Browser compatibility

+ + + +

{{Compat("api.HTMLHyperlinkElementUtils")}}

+ +

See also

+ + diff --git a/files/ko/web/api/document/activeelement/index.html b/files/ko/web/api/document/activeelement/index.html new file mode 100644 index 0000000000..2f4d4394d9 --- /dev/null +++ b/files/ko/web/api/document/activeelement/index.html @@ -0,0 +1,94 @@ +--- +title: DocumentOrShadowRoot.activeElement +slug: Web/API/DocumentOrShadowRoot/activeElement +tags: + - API + - Document + - DocumentOrShadowRoot + - Focus + - Property + - Reference + - ShadowRoot +translation_of: Web/API/DocumentOrShadowRoot/activeElement +--- +
{{APIRef("Shadow DOM")}}
+ +

{{domxref("Document")}}와 {{domxref("ShadowRoot")}} 인터페이스의 activeElement 읽기 전용 속성은 DOM과 섀도우 DOM 내에서 현재 포커스를 받은 {{domxref("Element")}} 객체를 반환합니다. 이 속성은 {{domxref("DocumentOrShadowRoot")}} {{Glossary("mixin", "믹스인")}}에서 상속받습니다.

+ +

activeElement 접근 시점에 텍스트를 블록 선택하고 있는 경우 해당하는 {{htmlelement("input")}}이나 {{htmlelement("textarea")}} 객체를 반환하는데, 그러면 그 객체의 {{domxref("Document.selectionStart", "selectionStart")}}와 {{domxref("Document.selectionEnd", "selectionEnd")}} 메서드를 사용해 선택에 대한 더 자세한 정보를 알아낼 수 있습니다. 포커스가 자주 가는 다른 경우로는 {{htmlelement("select")}} 요소나 type"button", "checkbox", "radio"인 {{htmlelement("input")}} 요소가 있습니다.

+ +

보통 사용자는 포커스 가능한 요소를 Tab 키를 사용해 탐색할 수 있고, 스페이스 바를 사용해 활성화(버튼을 누르거나 라디오 버튼을 켜는 등)할 수 있습니다. 포커스 가능한 요소는 현재 플랫폼과 브라우저 설정에 따라 다릅니다. 가령 macOS의 경우, 기본값에서는 텍스트 입력 칸이 아니면 보통 포커스 할 수 없습니다.

+ +
+

참고: 포커스(사용자의 입력 이벤트를 받는 요소)와 선택(문서 내에서 강조하고 있는 부분)은 다릅니다. 현재 선택 영역은 {{domxref("window.getSelection()")}}을 사용해 가져올 수 있습니다.

+
+ +

구문

+ +
element = DocumentOrShadowRoot.activeElement
+ +

+ +

포커스를 갖고 있는 {{domxref("Element")}}. 그런 요소가 없으면 {{htmlelement("body")}} 또는 {{jsxref("null")}}.

+ +

예제

+ +

HTML

+ +
<p>아래 두 영역에서 텍스트를 선택해보세요.</p>
+
+<form>
+  <textarea name="ta-example-one" id="ta-example-one" rows="7" cols="40">텍스트 영역 1. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec tincidunt, lorem a porttitor molestie, odio nibh iaculis libero, et accumsan nunc orci eu dui.</textarea>
+  <textarea name="ta-example-two" id="ta-example-two" rows="7" cols="40">텍스트 영역 2. Fusce ullamcorper, nisl ac porttitor adipiscing, urna orci egestas libero, ut accumsan orci lacus laoreet diam. Morbi sed euismod diam.</textarea>
+</form>
+
+<p>활성화된 요소 ID: <b id="output-element"></b></p>
+<p>선택한 텍스트: <b id="output-text"></b></p>
+ +

JavaScript

+ +
function onMouseUp(e) {
+  const activeTextarea = document.activeElement;
+  const selection = activeTextarea.value.substring(
+    activeTextarea.selectionStart, activeTextarea.selectionEnd
+  );
+
+  const outputElement = document.getElementById('output-element');
+  const outputText = document.getElementById('output-text');
+  outputElement.innerHTML = activeTextarea.id;
+  outputText.innerHTML = selection;
+}
+
+const textarea1 = document.getElementById('ta-example-one');
+const textarea2 = document.getElementById('ta-example-two');
+textarea1.addEventListener('mouseup', onMouseUp, false);
+textarea2.addEventListener('mouseup', onMouseUp, false);
+ +

결과

+ +

{{ EmbedLiveSample('예제', '400', '400') }}

+ +

명세

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', 'interaction.html#dom-document-activeelement', 'activeElement')}}{{Spec2('HTML WHATWG')}}
+ +

브라우저 호환성

+ +
+ + +

{{Compat("api.DocumentOrShadowRoot.activeElement")}}

+
diff --git a/files/ko/web/api/documentorshadowroot/activeelement/index.html b/files/ko/web/api/documentorshadowroot/activeelement/index.html deleted file mode 100644 index 2f4d4394d9..0000000000 --- a/files/ko/web/api/documentorshadowroot/activeelement/index.html +++ /dev/null @@ -1,94 +0,0 @@ ---- -title: DocumentOrShadowRoot.activeElement -slug: Web/API/DocumentOrShadowRoot/activeElement -tags: - - API - - Document - - DocumentOrShadowRoot - - Focus - - Property - - Reference - - ShadowRoot -translation_of: Web/API/DocumentOrShadowRoot/activeElement ---- -
{{APIRef("Shadow DOM")}}
- -

{{domxref("Document")}}와 {{domxref("ShadowRoot")}} 인터페이스의 activeElement 읽기 전용 속성은 DOM과 섀도우 DOM 내에서 현재 포커스를 받은 {{domxref("Element")}} 객체를 반환합니다. 이 속성은 {{domxref("DocumentOrShadowRoot")}} {{Glossary("mixin", "믹스인")}}에서 상속받습니다.

- -

activeElement 접근 시점에 텍스트를 블록 선택하고 있는 경우 해당하는 {{htmlelement("input")}}이나 {{htmlelement("textarea")}} 객체를 반환하는데, 그러면 그 객체의 {{domxref("Document.selectionStart", "selectionStart")}}와 {{domxref("Document.selectionEnd", "selectionEnd")}} 메서드를 사용해 선택에 대한 더 자세한 정보를 알아낼 수 있습니다. 포커스가 자주 가는 다른 경우로는 {{htmlelement("select")}} 요소나 type"button", "checkbox", "radio"인 {{htmlelement("input")}} 요소가 있습니다.

- -

보통 사용자는 포커스 가능한 요소를 Tab 키를 사용해 탐색할 수 있고, 스페이스 바를 사용해 활성화(버튼을 누르거나 라디오 버튼을 켜는 등)할 수 있습니다. 포커스 가능한 요소는 현재 플랫폼과 브라우저 설정에 따라 다릅니다. 가령 macOS의 경우, 기본값에서는 텍스트 입력 칸이 아니면 보통 포커스 할 수 없습니다.

- -
-

참고: 포커스(사용자의 입력 이벤트를 받는 요소)와 선택(문서 내에서 강조하고 있는 부분)은 다릅니다. 현재 선택 영역은 {{domxref("window.getSelection()")}}을 사용해 가져올 수 있습니다.

-
- -

구문

- -
element = DocumentOrShadowRoot.activeElement
- -

- -

포커스를 갖고 있는 {{domxref("Element")}}. 그런 요소가 없으면 {{htmlelement("body")}} 또는 {{jsxref("null")}}.

- -

예제

- -

HTML

- -
<p>아래 두 영역에서 텍스트를 선택해보세요.</p>
-
-<form>
-  <textarea name="ta-example-one" id="ta-example-one" rows="7" cols="40">텍스트 영역 1. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec tincidunt, lorem a porttitor molestie, odio nibh iaculis libero, et accumsan nunc orci eu dui.</textarea>
-  <textarea name="ta-example-two" id="ta-example-two" rows="7" cols="40">텍스트 영역 2. Fusce ullamcorper, nisl ac porttitor adipiscing, urna orci egestas libero, ut accumsan orci lacus laoreet diam. Morbi sed euismod diam.</textarea>
-</form>
-
-<p>활성화된 요소 ID: <b id="output-element"></b></p>
-<p>선택한 텍스트: <b id="output-text"></b></p>
- -

JavaScript

- -
function onMouseUp(e) {
-  const activeTextarea = document.activeElement;
-  const selection = activeTextarea.value.substring(
-    activeTextarea.selectionStart, activeTextarea.selectionEnd
-  );
-
-  const outputElement = document.getElementById('output-element');
-  const outputText = document.getElementById('output-text');
-  outputElement.innerHTML = activeTextarea.id;
-  outputText.innerHTML = selection;
-}
-
-const textarea1 = document.getElementById('ta-example-one');
-const textarea2 = document.getElementById('ta-example-two');
-textarea1.addEventListener('mouseup', onMouseUp, false);
-textarea2.addEventListener('mouseup', onMouseUp, false);
- -

결과

- -

{{ EmbedLiveSample('예제', '400', '400') }}

- -

명세

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML WHATWG', 'interaction.html#dom-document-activeelement', 'activeElement')}}{{Spec2('HTML WHATWG')}}
- -

브라우저 호환성

- -
- - -

{{Compat("api.DocumentOrShadowRoot.activeElement")}}

-
diff --git a/files/ko/web/api/htmlanchorelement/href/index.html b/files/ko/web/api/htmlanchorelement/href/index.html new file mode 100644 index 0000000000..ba2dbea4d5 --- /dev/null +++ b/files/ko/web/api/htmlanchorelement/href/index.html @@ -0,0 +1,51 @@ +--- +title: HTMLHyperlinkElementUtils.href +slug: Web/API/HTMLHyperlinkElementUtils/href +tags: + - API + - Experimental + - HTMLHyperlinkElementUtils + - Location + - Property + - Reference +translation_of: Web/API/HTMLHyperlinkElementUtils/href +--- +
{{ApiRef("URL API")}}
+ +

HTMLHyperlinkElementUtils.href 속성은 온전한 URL을 값으로 가지는 {{domxref("USVString")}}입니다.

+ +

예제

+ +
// Lets imagine an <a id="myAnchor" href="https://developer.mozilla.org/en-US/HTMLHyperlinkElementUtils/href"> element is in the document
+var anchor = document.getElementById("myAnchor");
+var result = anchor.href; // Returns: 'https://developer.mozilla.org/en-US/HTMLHyperlinkElementUtils/href'
+
+ +

명세

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', '#dom-hyperlink-href', 'HTMLHyperlinkElementUtils.href')}}{{Spec2('HTML WHATWG')}}Initial definition.
+ +

브라우저 호환성

+ + + +

{{Compat("api.HTMLHyperlinkElementUtils.href")}}

+ +

같이 보기

+ + diff --git a/files/ko/web/api/htmlhyperlinkelementutils/href/index.html b/files/ko/web/api/htmlhyperlinkelementutils/href/index.html deleted file mode 100644 index ba2dbea4d5..0000000000 --- a/files/ko/web/api/htmlhyperlinkelementutils/href/index.html +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.href -slug: Web/API/HTMLHyperlinkElementUtils/href -tags: - - API - - Experimental - - HTMLHyperlinkElementUtils - - Location - - Property - - Reference -translation_of: Web/API/HTMLHyperlinkElementUtils/href ---- -
{{ApiRef("URL API")}}
- -

HTMLHyperlinkElementUtils.href 속성은 온전한 URL을 값으로 가지는 {{domxref("USVString")}}입니다.

- -

예제

- -
// Lets imagine an <a id="myAnchor" href="https://developer.mozilla.org/en-US/HTMLHyperlinkElementUtils/href"> element is in the document
-var anchor = document.getElementById("myAnchor");
-var result = anchor.href; // Returns: 'https://developer.mozilla.org/en-US/HTMLHyperlinkElementUtils/href'
-
- -

명세

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML WHATWG', '#dom-hyperlink-href', 'HTMLHyperlinkElementUtils.href')}}{{Spec2('HTML WHATWG')}}Initial definition.
- -

브라우저 호환성

- - - -

{{Compat("api.HTMLHyperlinkElementUtils.href")}}

- -

같이 보기

- - diff --git a/files/ko/web/api/htmlhyperlinkelementutils/index.html b/files/ko/web/api/htmlhyperlinkelementutils/index.html deleted file mode 100644 index cd82725dbf..0000000000 --- a/files/ko/web/api/htmlhyperlinkelementutils/index.html +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils -slug: Web/API/HTMLHyperlinkElementUtils -tags: - - API - - Experimental - - Mixin - - NeedsTranslation - - TopicStub - - URL API -translation_of: Web/API/HTMLHyperlinkElementUtils ---- -

{{ApiRef("URL API")}}{{SeeCompatTable}}

- -

The HTMLHyperlinkElementUtils mixin defines utility methods and properties to work with {{domxref("HTMLAnchorElement")}} and {{domxref("HTMLAreaElement")}}. These utilities allow to deal with common features like URLs.

- -

There are no objects of this type, but several objects {{domxref("HTMLAnchorElement")}} and {{domxref("HTMLAreaElement")}} implement it.

- -

Properties

- -
-

Note: This interface doesn't inherit any property.

-
- -
-
{{domxref("HTMLHyperlinkElementUtils.href")}}
-
This is a {{domxref("USVString")}} containing the whole URL.
-
{{domxref("HTMLHyperlinkElementUtils.protocol")}}
-
This is a {{domxref("USVString")}} containing the protocol scheme of the URL, including the final ':'.
-
{{domxref("HTMLHyperlinkElementUtils.host")}}
-
This is a {{domxref("USVString")}} containing the host, that is the hostname, and then, if the port of the URL is not empty (which can happen because it was not specified or because it was specified to be the default port of the URL's scheme), a ':', and the port of the URL.
-
{{domxref("HTMLHyperlinkElementUtils.hostname")}}
-
This is a {{domxref("USVString")}} containing the domain of the URL.
-
{{domxref("HTMLHyperlinkElementUtils.port")}}
-
This is a {{domxref("USVString")}} containing the port number of the URL.
-
{{domxref("HTMLHyperlinkElementUtils.pathname")}}
-
This is a {{domxref("USVString")}} containing an initial '/' followed by the path of the URL.
-
{{domxref("HTMLHyperlinkElementUtils.search")}}
-
This is a {{domxref("USVString")}} containing a '?' followed by the parameters of the URL.
-
{{domxref("HTMLHyperlinkElementUtils.hash")}}
-
This is a {{domxref("USVString")}} containing a '#' followed by the fragment identifier of the URL.
-
{{domxref("HTMLHyperlinkElementUtils.username")}}
-
This is a {{domxref("USVString")}} containing the username specified before the domain name.
-
{{domxref("HTMLHyperlinkElementUtils.password")}}
-
This is a {{domxref("USVString")}} containing the password specified before the domain name.
-
{{domxref("HTMLHyperlinkElementUtils.origin")}} {{readonlyInline}}
-
This returns a {{domxref("USVString")}} containing the origin of the URL (that is its scheme, its domain and its port).
-
- -

Methods

- -
-

Note: This interface doesn't inherit any method.

-
- -
-
{{domxref("HTMLHyperlinkElementUtils.toString()")}}
-
This returns a {{domxref("DOMString")}} containing the whole URL. It is a synonym for {{domxref("HTMLHyperlinkElementUtils.href")}}, though it can't be used to modify the value.
-
- -

Specifications

- - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML WHATWG', '#htmlhyperlinkelementutils', 'HTMLHyperlinkElementUtils')}}{{Spec2('HTML WHATWG')}}Initial definition
- -

Browser compatibility

- - - -

{{Compat("api.HTMLHyperlinkElementUtils")}}

- -

See also

- - diff --git a/files/pl/web/api/document/activeelement/index.html b/files/pl/web/api/document/activeelement/index.html new file mode 100644 index 0000000000..173e0b9d64 --- /dev/null +++ b/files/pl/web/api/document/activeelement/index.html @@ -0,0 +1,28 @@ +--- +title: document.activeElement +slug: Web/API/DocumentOrShadowRoot/activeElement +tags: + - DOM + - Dokumentacja_Gecko_DOM + - Gecko + - Wszystkie_kategorie +translation_of: Web/API/DocumentOrShadowRoot/activeElement +translation_of_original: Web/API/Document/activeElement +original_slug: Web/API/Document/activeElement +--- +

{{ ApiRef() }}

+

Podsumowanie

+

Zwraca element, na którym ustawiony jest fokus.

+

{{ Note("Ten atrybut jest częścią specyfikacji HTML 5, która jest wciąż opracowywana.") }}

+

Składnia

+
var curElement = document.activeElement;
+
+

Przykład

+

Specyfikacja

+

Zarządzanie fokusem

+

 

+

 

+

 

+
+  
+

{{ languages( { "en": "en/DOM/document.activeElement", "es": "es/DOM/element.activeElement", "fr": "fr/DOM/document.activeElement", "ja": "ja/DOM/document.activeElement" } ) }}

diff --git a/files/pl/web/api/documentorshadowroot/activeelement/index.html b/files/pl/web/api/documentorshadowroot/activeelement/index.html deleted file mode 100644 index 173e0b9d64..0000000000 --- a/files/pl/web/api/documentorshadowroot/activeelement/index.html +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: document.activeElement -slug: Web/API/DocumentOrShadowRoot/activeElement -tags: - - DOM - - Dokumentacja_Gecko_DOM - - Gecko - - Wszystkie_kategorie -translation_of: Web/API/DocumentOrShadowRoot/activeElement -translation_of_original: Web/API/Document/activeElement -original_slug: Web/API/Document/activeElement ---- -

{{ ApiRef() }}

-

Podsumowanie

-

Zwraca element, na którym ustawiony jest fokus.

-

{{ Note("Ten atrybut jest częścią specyfikacji HTML 5, która jest wciąż opracowywana.") }}

-

Składnia

-
var curElement = document.activeElement;
-
-

Przykład

-

Specyfikacja

-

Zarządzanie fokusem

-

 

-

 

-

 

-
-  
-

{{ languages( { "en": "en/DOM/document.activeElement", "es": "es/DOM/element.activeElement", "fr": "fr/DOM/document.activeElement", "ja": "ja/DOM/document.activeElement" } ) }}

diff --git a/files/pt-br/conflicting/web/accessibility/aria/widgets/index.html b/files/pt-br/conflicting/web/accessibility/aria/widgets/index.html new file mode 100644 index 0000000000..529e77dd5f --- /dev/null +++ b/files/pt-br/conflicting/web/accessibility/aria/widgets/index.html @@ -0,0 +1,73 @@ +--- +title: Visão geral +slug: Web/Accessibility/ARIA/widgets/overview +tags: + - Acessibilidade + - JavaScript + - Landing + - PrecisaAtualizar +translation_of: Web/Accessibility/ARIA/widgets/overview +original_slug: Web/Accessibility/ARIA/widgets/Visão_geral +--- +
Aviso: precisa de atualização
+ +

Introdução 

+ +

Alguns exemplos funcionais e boas práticas na construção de widgets acessíveis aplicando JavaScript.

+ +

Recursos Gerais

+ + + +

Caixa de seleção

+ + + + + + + +

Deslizantes

+ + + +

Abas

+ + + +

Combo-box

+ + + + + + + +

Validação de Formulários

+ + + +

Tabelas

+ + diff --git a/files/pt-br/web/accessibility/aria/widgets/overview/index.html b/files/pt-br/web/accessibility/aria/widgets/overview/index.html deleted file mode 100644 index 529e77dd5f..0000000000 --- a/files/pt-br/web/accessibility/aria/widgets/overview/index.html +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: Visão geral -slug: Web/Accessibility/ARIA/widgets/overview -tags: - - Acessibilidade - - JavaScript - - Landing - - PrecisaAtualizar -translation_of: Web/Accessibility/ARIA/widgets/overview -original_slug: Web/Accessibility/ARIA/widgets/Visão_geral ---- -
Aviso: precisa de atualização
- -

Introdução 

- -

Alguns exemplos funcionais e boas práticas na construção de widgets acessíveis aplicando JavaScript.

- -

Recursos Gerais

- - - -

Caixa de seleção

- - - - - - - -

Deslizantes

- - - -

Abas

- - - -

Combo-box

- - - - - - - -

Validação de Formulários

- - - -

Tabelas

- - diff --git a/files/pt-br/web/api/document/activeelement/index.html b/files/pt-br/web/api/document/activeelement/index.html new file mode 100644 index 0000000000..2223a29d1d --- /dev/null +++ b/files/pt-br/web/api/document/activeelement/index.html @@ -0,0 +1,166 @@ +--- +title: Document.activeElement +slug: Web/API/DocumentOrShadowRoot/activeElement +tags: + - API + - Document + - HTML DOM + - Property + - Reference +translation_of: Web/API/DocumentOrShadowRoot/activeElement +translation_of_original: Web/API/Document/activeElement +original_slug: Web/API/Document/activeElement +--- +

{{APIRef("DOM")}}

+ +

Retorna o {{ domxref("Element", "elemento") }} atualmente em foco, ou seja, o elemento que receberá os eventos do teclado caso o usuário digite algo. Esse atributo é somente-leitura.

+ +

Geralmente retorna um {{ HTMLElement("input") }} ou {{ HTMLElement("textarea") }}, caso esteja com uma seleção de texto ativa. Caso esteja, pode obter mais informações sobre a seleção utilizando as propriedades selectionStartselectionEnd. Caso o elemento em foco seja um {{ HTMLElement("select") }}(menu) ou {{ HTMLElement("input") }} do tipo button, checkbox ou radio.

+ +
Note: No Mac, elementos que nao sejam campos de texto geralmente não recebem foco.
+ +

Normalmente o usuário pode navegar entre os elementos que pode receber foco na página com o uso da tecla tab e ativar estes elementos com a tecla espaço (apertar um botão ou selecionar uma opção).

+ +

Não confunda foco com uma seleção de texto no documento, que consiste em sua maioria de nódos de texto estáticos. Veja {{ domxref("window.getSelection()") }}.

+ +

Quando não há nada selecionado, o activeElement da página é o {{ HTMLElement("body") }} ou null

+ +
+

Este atributo é parte da seção "Em desenvolvimento" da especificação do HTML 5.

+
+ +

Sintaxe

+ +
var curElement = document.activeElement;
+
+ +

Exemplo

+ +
<!DOCTYPE HTML>
+<html>
+<head>
+    <script type="text/javascript" charset="utf-8">
+    function init() {
+
+        function onMouseUp(e) {
+            console.log(e);
+            var outputElement = document.getElementById('output-element');
+            var outputText = document.getElementById('output-text');
+            var selectedTextArea = document.activeElement;
+            var selection = selectedTextArea.value.substring(
+            selectedTextArea.selectionStart, selectedTextArea.selectionEnd);
+            outputElement.innerHTML = selectedTextArea.id;
+            outputText.innerHTML = selection;
+        }
+
+        document.getElementById("ta-example-one").addEventListener("mouseup", onMouseUp, false);
+        document.getElementById("ta-example-two").addEventListener("mouseup", onMouseUp, false);
+    }
+    </script>
+</head>
+<body onload="init()">
+<div>
+    Select some text from one of the Textareas below:
+</div>
+<form id="frm-example" action="#" accept-charset="utf-8">
+<textarea name="ta-example-one" id="ta-example-one" rows="8" cols="40">
+This is Textarea Example One:
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec tincidunt, lorem a porttitor molestie, odio nibh iaculis libero, et accumsan nunc orci eu dui.
+</textarea>
+<textarea name="ta-example-two" id="ta-example-two" rows="8" cols="40">
+This is Textarea Example Two:
+Fusce ullamcorper, nisl ac porttitor adipiscing, urna orci egestas libero, ut accumsan orci lacus laoreet diam. Morbi sed euismod diam.
+</textarea>
+</form>
+Active Element Id: <span id="output-element"></span><br/>
+Selected Text: <span id="output-text"></span>
+
+</body>
+</html>
+
+ +

View on JSFiddle

+ +

Notas

+ +

Originalmente apresentada como extensão DOM proprietária no Internet Explorer 4, esta propriedade também é suportada no Opera e Safari (versão 4 ou maior)

+ +

Especificações

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', 'interaction.html#dom-document-activeelement', 'activeElement')}}{{Spec2('HTML WHATWG')}} 
+ +

Compatibilidade nos navegadores

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support23.04 [1]9.64.0
+
+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureAndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Basic support{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}
+
+ +

[1]: O IE9 tem um bug que ao tentar acessar o activeElement do {{domxref("window.parent")}} {{domxref("Document")}} de um {{HTMLElement("iframe")}}(i.e. parent.document.activeElement) é lançado um erro

+ +

Eventos relacionados

+ + diff --git a/files/pt-br/web/api/documentorshadowroot/activeelement/index.html b/files/pt-br/web/api/documentorshadowroot/activeelement/index.html deleted file mode 100644 index 2223a29d1d..0000000000 --- a/files/pt-br/web/api/documentorshadowroot/activeelement/index.html +++ /dev/null @@ -1,166 +0,0 @@ ---- -title: Document.activeElement -slug: Web/API/DocumentOrShadowRoot/activeElement -tags: - - API - - Document - - HTML DOM - - Property - - Reference -translation_of: Web/API/DocumentOrShadowRoot/activeElement -translation_of_original: Web/API/Document/activeElement -original_slug: Web/API/Document/activeElement ---- -

{{APIRef("DOM")}}

- -

Retorna o {{ domxref("Element", "elemento") }} atualmente em foco, ou seja, o elemento que receberá os eventos do teclado caso o usuário digite algo. Esse atributo é somente-leitura.

- -

Geralmente retorna um {{ HTMLElement("input") }} ou {{ HTMLElement("textarea") }}, caso esteja com uma seleção de texto ativa. Caso esteja, pode obter mais informações sobre a seleção utilizando as propriedades selectionStartselectionEnd. Caso o elemento em foco seja um {{ HTMLElement("select") }}(menu) ou {{ HTMLElement("input") }} do tipo button, checkbox ou radio.

- -
Note: No Mac, elementos que nao sejam campos de texto geralmente não recebem foco.
- -

Normalmente o usuário pode navegar entre os elementos que pode receber foco na página com o uso da tecla tab e ativar estes elementos com a tecla espaço (apertar um botão ou selecionar uma opção).

- -

Não confunda foco com uma seleção de texto no documento, que consiste em sua maioria de nódos de texto estáticos. Veja {{ domxref("window.getSelection()") }}.

- -

Quando não há nada selecionado, o activeElement da página é o {{ HTMLElement("body") }} ou null

- -
-

Este atributo é parte da seção "Em desenvolvimento" da especificação do HTML 5.

-
- -

Sintaxe

- -
var curElement = document.activeElement;
-
- -

Exemplo

- -
<!DOCTYPE HTML>
-<html>
-<head>
-    <script type="text/javascript" charset="utf-8">
-    function init() {
-
-        function onMouseUp(e) {
-            console.log(e);
-            var outputElement = document.getElementById('output-element');
-            var outputText = document.getElementById('output-text');
-            var selectedTextArea = document.activeElement;
-            var selection = selectedTextArea.value.substring(
-            selectedTextArea.selectionStart, selectedTextArea.selectionEnd);
-            outputElement.innerHTML = selectedTextArea.id;
-            outputText.innerHTML = selection;
-        }
-
-        document.getElementById("ta-example-one").addEventListener("mouseup", onMouseUp, false);
-        document.getElementById("ta-example-two").addEventListener("mouseup", onMouseUp, false);
-    }
-    </script>
-</head>
-<body onload="init()">
-<div>
-    Select some text from one of the Textareas below:
-</div>
-<form id="frm-example" action="#" accept-charset="utf-8">
-<textarea name="ta-example-one" id="ta-example-one" rows="8" cols="40">
-This is Textarea Example One:
-Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec tincidunt, lorem a porttitor molestie, odio nibh iaculis libero, et accumsan nunc orci eu dui.
-</textarea>
-<textarea name="ta-example-two" id="ta-example-two" rows="8" cols="40">
-This is Textarea Example Two:
-Fusce ullamcorper, nisl ac porttitor adipiscing, urna orci egestas libero, ut accumsan orci lacus laoreet diam. Morbi sed euismod diam.
-</textarea>
-</form>
-Active Element Id: <span id="output-element"></span><br/>
-Selected Text: <span id="output-text"></span>
-
-</body>
-</html>
-
- -

View on JSFiddle

- -

Notas

- -

Originalmente apresentada como extensão DOM proprietária no Internet Explorer 4, esta propriedade também é suportada no Opera e Safari (versão 4 ou maior)

- -

Especificações

- - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML WHATWG', 'interaction.html#dom-document-activeelement', 'activeElement')}}{{Spec2('HTML WHATWG')}} 
- -

Compatibilidade nos navegadores

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support23.04 [1]9.64.0
-
- -
- - - - - - - - - - - - - - - - - - - -
FeatureAndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Basic support{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}
-
- -

[1]: O IE9 tem um bug que ao tentar acessar o activeElement do {{domxref("window.parent")}} {{domxref("Document")}} de um {{HTMLElement("iframe")}}(i.e. parent.document.activeElement) é lançado um erro

- -

Eventos relacionados

- - diff --git a/files/ru/conflicting/web/api/element_861159909c20acebf8e506c3bb0e2f7e/index.html b/files/ru/conflicting/web/api/element_861159909c20acebf8e506c3bb0e2f7e/index.html new file mode 100644 index 0000000000..20f5c6ea40 --- /dev/null +++ b/files/ru/conflicting/web/api/element_861159909c20acebf8e506c3bb0e2f7e/index.html @@ -0,0 +1,132 @@ +--- +title: NonDocumentTypeChildNode +slug: Web/API/NonDocumentTypeChildNode +tags: + - API + - DOM + - Interface + - NeedsTranslation + - Reference + - TopicStub +translation_of: Web/API/NonDocumentTypeChildNode +--- +
{{APIRef("DOM")}}
+ +

The NonDocumentTypeChildNode interface contains methods that are particular to {{domxref("Node")}} objects that can have a parent, but not suitable for {{domxref("DocumentType")}}.

+ +

NonDocumentTypeChildNode is a raw interface and no object of this type can be created; it is implemented by {{domxref("Element")}}, and {{domxref("CharacterData")}} objects.

+ +

Properties

+ +

There is no inherited property.

+ +
+
{{domxref("NonDocumentTypeChildNode.previousElementSibling")}} {{readonlyInline}}
+
Returns the {{domxref("Element")}} immediately prior to this node in its parent's children list, or null if there is no {{domxref("Element")}} in the list prior to this node.
+
{{domxref("NonDocumentTypeChildNode.nextElementSibling")}} {{readonlyInline}}
+
Returns the {{domxref("Element")}} immediately following this node in its parent's children list, or null if there is no {{domxref("Element")}} in the list following this node.
+
+ +

Methods

+ +

There is neither inherited, nor specific method.

+ +

Specifications

+ + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('DOM WHATWG', '#interface-childnode', 'NonDocumentTypeChildNode')}}{{Spec2('DOM WHATWG')}}Splitted the ElementTraversal interface in {{domxref("ParentNode")}}, {{domxref("ChildNode")}}, and NonDocumentTypeChildNode. The previousElementSibling and nextElementSibling are now defined on the latter.
+ The {{domxref("CharacterData")}} and {{domxref("Element")}} implemented the new interfaces.
{{SpecName('Element Traversal', '#interface-elementTraversal', 'ElementTraversal')}}{{Spec2('Element Traversal')}}Added the initial definition of its properties to the ElementTraversal pure interface and use it on {{domxref("Element")}}.
+ +

Browser compatibility

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support (on {{domxref("Element")}})1.0{{CompatGeckoDesktop("1.9.1")}}9.010.04.0
Support (on {{domxref("CharacterData")}})1.0{{CompatGeckoDesktop("25.0")}} [1]9.010.04.0
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support (on {{domxref("Element")}}){{ CompatVersionUnknown() }}{{CompatGeckoDesktop("1.9.1")}}{{ CompatVersionUnknown() }}10.0{{ CompatVersionUnknown() }}
Support (on {{domxref("CharacterData")}}){{ CompatVersionUnknown() }}{{CompatGeckoDesktop("25.0")}}{{ CompatVersionUnknown() }}10.0{{ CompatVersionUnknown() }}
+
+ +

[1] Firefox 25 also added the two properties defined here on {{domxref("DocumentType")}}, this was removed in Firefox 28 due to compatibility problems, and led to the creation of this new pure interface.

+ +

See also

+ + diff --git a/files/ru/orphaned/web/api/htmlhyperlinkelementutils/index.html b/files/ru/orphaned/web/api/htmlhyperlinkelementutils/index.html new file mode 100644 index 0000000000..2abe580d83 --- /dev/null +++ b/files/ru/orphaned/web/api/htmlhyperlinkelementutils/index.html @@ -0,0 +1,178 @@ +--- +title: HTMLHyperlinkElementUtils +slug: Web/API/HTMLHyperlinkElementUtils +tags: + - API + - Experimental + - Mixin + - NeedsTranslation + - TopicStub + - URL API +translation_of: Web/API/HTMLHyperlinkElementUtils +--- +

{{ApiRef("URL API")}}{{SeeCompatTable}}

+ +

The HTMLHyperlinkElementUtils mixin defines utility methods and properties to work with {{domxref("HTMLAnchorElement")}} and {{domxref("HTMLAreaElement")}}. These utilities allow to deal with common features like URLs.

+ +

There are no objects of this type, but several objects {{domxref("HTMLAnchorElement")}} and {{domxref("HTMLAreaElement")}} implement it.

+ +

Properties

+ +

This interface doesn't inherit any property.

+ +
+
{{domxref("HTMLHyperlinkElementUtils.href")}}
+
Is a {{domxref("USVString")}} containing the whole URL.
+
{{domxref("HTMLHyperlinkElementUtils.protocol")}}
+
Is a {{domxref("USVString")}} containing the protocol scheme of the URL, including the final ':'.
+
{{domxref("HTMLHyperlinkElementUtils.host")}}
+
Is a {{domxref("USVString")}} containing the host, that is the hostname, and then, if the port of the URL is not empty (which can happen because it was not specified or because it was specified to be the default port of the URL's scheme), a ':', and the port of the URL.
+
{{domxref("HTMLHyperlinkElementUtils.hostname")}}
+
Is a {{domxref("USVString")}} containing the domain of the URL.
+
{{domxref("HTMLHyperlinkElementUtils.port")}}
+
Is a {{domxref("USVString")}} containing the port number of the URL.
+
{{domxref("HTMLHyperlinkElementUtils.pathname")}}
+
Is a {{domxref("USVString")}} containing an initial '/' followed by the path of the URL.
+
{{domxref("HTMLHyperlinkElementUtils.search")}}
+
Is a {{domxref("USVString")}} containing a '?' followed by the parameters of the URL.
+
{{domxref("HTMLHyperlinkElementUtils.hash")}}
+
Is a {{domxref("USVString")}} containing a '#' followed by the fragment identifier of the URL.
+
{{domxref("HTMLHyperlinkElementUtils.username")}}
+
Is a {{domxref("USVString")}} containing the username specified before the domain name.
+
{{domxref("HTMLHyperlinkElementUtils.password")}}
+
Is a {{domxref("USVString")}} containing the password specified before the domain name.
+
{{domxref("HTMLHyperlinkElementUtils.origin")}} {{readonlyInline}}
+
Returns a {{domxref("USVString")}} containing the origin of the URL, that is its scheme, its domain and its port.
+
+ +

Methods

+ +

This interface doesn't inherit any method.

+ +
+
{{domxref("HTMLHyperlinkElementUtils.toString()")}}
+
Returns a {{domxref("DOMString")}} containing the whole URL. It is a synonym for {{domxref("HTMLHyperlinkElementUtils.href")}}, though it can't be used to modify the value.
+
+ +

Specifications

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', '#htmlhyperlinkelementutils', 'HTMLHyperlinkElementUtils')}}{{Spec2('HTML WHATWG')}}Initial definition
+ +

Browser compatibility

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatNo}} [1]{{CompatGeckoDesktop("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
username and password{{CompatUnknown}}{{CompatGeckoDesktop("26")}} [2]{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}
origin {{CompatVersionUnknown()}}{{CompatGeckoDesktop("26")}} [2]{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatNo}} [1]{{CompatNo}} [1]{{CompatGeckoMobile("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
username and password{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("26")}} [2]{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}
origin {{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("26")}} [2]{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +

[1] Though not grouped in a single abstract interface, these methods are directly available on the interfaces that implement it, if this interface is supported.

+ +

[2] This mixin was called URLUtils before Firefox 45, and was also implemented to other by other interfaces, like {{domxref("Location")}}. From Firefox 45, the other interfaces implements their own version of the properties and methods they need.

+ +

See also

+ + + +
+
 
+
diff --git a/files/ru/web/api/document/activeelement/index.html b/files/ru/web/api/document/activeelement/index.html new file mode 100644 index 0000000000..4261eee4e9 --- /dev/null +++ b/files/ru/web/api/document/activeelement/index.html @@ -0,0 +1,166 @@ +--- +title: Document.activeElement +slug: Web/API/DocumentOrShadowRoot/activeElement +tags: + - API + - Document + - HTML DOM + - Property + - Reference +translation_of: Web/API/DocumentOrShadowRoot/activeElement +translation_of_original: Web/API/Document/activeElement +original_slug: Web/API/Document/activeElement +--- +

{{ ApiRef() }}

+ +

Анотация

+ +

Возвращает текущий сфокусированный элемент, то есть элемент, на котором будут вызываться события клавиатуры, если пользователь начнёт с неё ввод. Этот атрибут доступен только для чтения.

+ +

Часто возвращается {{ HTMLElement("input") }} или {{ HTMLElement("textarea") }} объект, если он содержит в себе выделенный в данный момент текст. При этом вы можете получить более подробные сведения, используя свойства элемента  selectionStart и selectionEnd.  В других случаях сфокусированным элементом может быть {{ HTMLElement("select") }} элемент (меню) или {{ HTMLElement("input") }} элемент типа button, checkbox или radio.

+ +

{{ Note("На Mac, элементы, не являющиеся текстовыми полями, как правило, не получают фокус.") }}

+ +

Как правило, пользователь может нажать клавишу табуляции для перемещения по фокусируемым элементам страницы, и использовать пробел для их активации (нажать кнопку button, выбрать переключатель radio).

+ +

Не следует путать фокус с выделением документа, состоящего в основном из статических текстовых узлов. См. {{ domxref("window.getSelection()") }}. 

+ +

Когда выделение отсутствует, активным элементом является {{ HTMLElement("body") }} страницы или null. 

+ +

{{ Note("Этот атрибут является частью разрабатываемой спецификации HTML 5.") }}

+ +

Синтаксис

+ +
var curElement = document.activeElement;
+
+ +

Пример

+ +
<!DOCTYPE HTML>
+<html>
+<head>
+    <script type="text/javascript" charset="utf-8">
+    function init() {
+
+        function onMouseUp(e) {
+            console.log(e);
+            var outputElement = document.getElementById('output-element');
+            var outputText = document.getElementById('output-text');
+            var selectedTextArea = document.activeElement;
+            var selection = selectedTextArea.value.substring(
+            selectedTextArea.selectionStart, selectedTextArea.selectionEnd);
+            outputElement.innerHTML = selectedTextArea.id;
+            outputText.innerHTML = selection;
+        }
+
+        document.getElementById("ta-example-one").addEventListener("mouseup", onMouseUp, false);
+        document.getElementById("ta-example-two").addEventListener("mouseup", onMouseUp, false);
+    }
+    </script>
+</head>
+<body onload="init()">
+<div>
+    Выделите текст в одном из текстовых полей ниже:
+</div>
+<form id="frm-example" action="#" accept-charset="utf-8">
+<textarea name="ta-example-one" id="ta-example-one" rows="8" cols="40">
+Это текстовое поле 1:
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec tincidunt, lorem a porttitor molestie, odio nibh iaculis libero, et accumsan nunc orci eu dui.
+</textarea>
+<textarea name="ta-example-two" id="ta-example-two" rows="8" cols="40">
+Это текстовое поле 2:
+Fusce ullamcorper, nisl ac porttitor adipiscing, urna orci egestas libero, ut accumsan orci lacus laoreet diam. Morbi sed euismod diam.
+</textarea>
+</form>
+ID активного элемента: <span id="output-element"></span><br/>
+Выделенный текст: <span id="output-text"></span>
+
+</body>
+</html>
+
+ +

Посмотреть на JSFiddle

+ +

Примечания

+ +

Первоначально введенное как собственное расширение DOM в Internet Explorer 4, это свойство также поддерживается в Opera и Safari (в версии 4).

+ +

Спецификации

+ + + + + + + + + + + + + + + + +
СпецификацияСтатусКомментарий
{{SpecName('HTML WHATWG', 'interaction.html#dom-document-activeelement', 'activeElement')}}{{Spec2('HTML WHATWG')}} 
+ +

Совместимость с браузерами

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support23.04 [1]9.64.0
+
+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureAndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Basic support{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}
+
+ +

[1]: В IE9 наблюдается баг: при попытке получения доступа к activeElement в {{domxref("window.parent")}} {{domxref("Document")}} из {{HTMLElement("iframe")}} (т.е. parent.document.activeElement) выбрасывается ошибка.

+ +

Связанные события

+ + diff --git a/files/ru/web/api/documentorshadowroot/activeelement/index.html b/files/ru/web/api/documentorshadowroot/activeelement/index.html deleted file mode 100644 index 4261eee4e9..0000000000 --- a/files/ru/web/api/documentorshadowroot/activeelement/index.html +++ /dev/null @@ -1,166 +0,0 @@ ---- -title: Document.activeElement -slug: Web/API/DocumentOrShadowRoot/activeElement -tags: - - API - - Document - - HTML DOM - - Property - - Reference -translation_of: Web/API/DocumentOrShadowRoot/activeElement -translation_of_original: Web/API/Document/activeElement -original_slug: Web/API/Document/activeElement ---- -

{{ ApiRef() }}

- -

Анотация

- -

Возвращает текущий сфокусированный элемент, то есть элемент, на котором будут вызываться события клавиатуры, если пользователь начнёт с неё ввод. Этот атрибут доступен только для чтения.

- -

Часто возвращается {{ HTMLElement("input") }} или {{ HTMLElement("textarea") }} объект, если он содержит в себе выделенный в данный момент текст. При этом вы можете получить более подробные сведения, используя свойства элемента  selectionStart и selectionEnd.  В других случаях сфокусированным элементом может быть {{ HTMLElement("select") }} элемент (меню) или {{ HTMLElement("input") }} элемент типа button, checkbox или radio.

- -

{{ Note("На Mac, элементы, не являющиеся текстовыми полями, как правило, не получают фокус.") }}

- -

Как правило, пользователь может нажать клавишу табуляции для перемещения по фокусируемым элементам страницы, и использовать пробел для их активации (нажать кнопку button, выбрать переключатель radio).

- -

Не следует путать фокус с выделением документа, состоящего в основном из статических текстовых узлов. См. {{ domxref("window.getSelection()") }}. 

- -

Когда выделение отсутствует, активным элементом является {{ HTMLElement("body") }} страницы или null. 

- -

{{ Note("Этот атрибут является частью разрабатываемой спецификации HTML 5.") }}

- -

Синтаксис

- -
var curElement = document.activeElement;
-
- -

Пример

- -
<!DOCTYPE HTML>
-<html>
-<head>
-    <script type="text/javascript" charset="utf-8">
-    function init() {
-
-        function onMouseUp(e) {
-            console.log(e);
-            var outputElement = document.getElementById('output-element');
-            var outputText = document.getElementById('output-text');
-            var selectedTextArea = document.activeElement;
-            var selection = selectedTextArea.value.substring(
-            selectedTextArea.selectionStart, selectedTextArea.selectionEnd);
-            outputElement.innerHTML = selectedTextArea.id;
-            outputText.innerHTML = selection;
-        }
-
-        document.getElementById("ta-example-one").addEventListener("mouseup", onMouseUp, false);
-        document.getElementById("ta-example-two").addEventListener("mouseup", onMouseUp, false);
-    }
-    </script>
-</head>
-<body onload="init()">
-<div>
-    Выделите текст в одном из текстовых полей ниже:
-</div>
-<form id="frm-example" action="#" accept-charset="utf-8">
-<textarea name="ta-example-one" id="ta-example-one" rows="8" cols="40">
-Это текстовое поле 1:
-Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec tincidunt, lorem a porttitor molestie, odio nibh iaculis libero, et accumsan nunc orci eu dui.
-</textarea>
-<textarea name="ta-example-two" id="ta-example-two" rows="8" cols="40">
-Это текстовое поле 2:
-Fusce ullamcorper, nisl ac porttitor adipiscing, urna orci egestas libero, ut accumsan orci lacus laoreet diam. Morbi sed euismod diam.
-</textarea>
-</form>
-ID активного элемента: <span id="output-element"></span><br/>
-Выделенный текст: <span id="output-text"></span>
-
-</body>
-</html>
-
- -

Посмотреть на JSFiddle

- -

Примечания

- -

Первоначально введенное как собственное расширение DOM в Internet Explorer 4, это свойство также поддерживается в Opera и Safari (в версии 4).

- -

Спецификации

- - - - - - - - - - - - - - - - -
СпецификацияСтатусКомментарий
{{SpecName('HTML WHATWG', 'interaction.html#dom-document-activeelement', 'activeElement')}}{{Spec2('HTML WHATWG')}} 
- -

Совместимость с браузерами

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support23.04 [1]9.64.0
-
- -
- - - - - - - - - - - - - - - - - - - -
FeatureAndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Basic support{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}
-
- -

[1]: В IE9 наблюдается баг: при попытке получения доступа к activeElement в {{domxref("window.parent")}} {{domxref("Document")}} из {{HTMLElement("iframe")}} (т.е. parent.document.activeElement) выбрасывается ошибка.

- -

Связанные события

- - diff --git a/files/ru/web/api/element/nextelementsibling/index.html b/files/ru/web/api/element/nextelementsibling/index.html new file mode 100644 index 0000000000..1e8d05c4c2 --- /dev/null +++ b/files/ru/web/api/element/nextelementsibling/index.html @@ -0,0 +1,174 @@ +--- +title: NonDocumentTypeChildNode.nextElementSibling +slug: Web/API/NonDocumentTypeChildNode/nextElementSibling +translation_of: Web/API/NonDocumentTypeChildNode/nextElementSibling +original_slug: Web/API/NonDocumentTypeChildNode/NonDocumentTypeChildNode.nextElementSibling +--- +
{{APIRef("DOM")}}
+ +

NonDocumentTypeChildNode.nextElementSibling свойство только для чтения, возвращающее последующий элемент перед текущим, или null, если элемент является последним в своём родительском узле.

+ +

Синтаксис

+ +
var nextNode = elementNodeReference.nextElementSibling; 
+ +

Пример

+ +
<div id="div-01">Это div-01</div>
+<div id="div-02">Это div-02</div>
+
+<script type="text/javascript">
+  var el = document.getElementById('div-01').nextElementSibling;
+  console.log('Сосед div-01:');
+  while (el) {
+    console.log(el.nodeName);
+    el = el.nextElementSibling;
+  }
+</script>
+
+ +

Этот пример выведет в консоль следующее:

+ +
Сосед div-01:
+DIV
+SCRIPT
+ +

Полифилл для IE8

+ +

Данное свойство не пожддерживается до IE9. Используйте следующий полифилл, чтобы обойти этот недостаток:

+ +
// Источник: https://github.com/Alhadis/Snippets/blob/master/js/polyfills/IE8-child-elements.js
+if (!('nextElementSibling' in document.documentElement)) {
+    Object.defineProperty(Element.prototype, 'nextElementSibling', {
+        get: function() {
+            var e = this.nextSibling;
+            while (e && 1 !== e.nodeType) {
+                e = e.nextSibling;
+            }
+            return e;
+        }
+    });
+}
+ +

Полифилл для IE9+ и Safari

+ +
// Источник: https://github.com/jserz/js_piece/blob/master/DOM/NonDocumentTypeChildNode/nextElementSibling/nextElementSibling.md
+(function(arr) {
+    arr.forEach(function(item) {
+        if (item.hasOwnProperty('nextElementSibling')) {
+            return;
+        }
+        Object.defineProperty(item, 'nextElementSibling', {
+            configurable: true,
+            enumerable: true,
+            get: function() {
+                var el = this;
+                while (el = el.nextSibling) {
+                    if (el.nodeType === 1) {
+                        return el;
+                    }
+                }
+                return null;
+            },
+            set: undefined
+        });
+    });
+})([Element.prototype, CharacterData.prototype]);
+ +

Спецификации

+ + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('DOM WHATWG', '#dom-nondocumenttypechildnode-nextelementsibling', 'ChildNodenextElementSibling')}}{{Spec2('DOM WHATWG')}}Split the ElementTraversal interface in {{domxref("ChildNode")}}, {{domxref("ParentNode")}}, and {{domxref("NonDocumentTypeChildNode")}}. This method is now defined on the former.
+ The {{domxref("Element")}} and {{domxref("CharacterData")}} interfaces implemented the new interface.
{{SpecName('Element Traversal', '#attribute-nextElementSibling', 'ElementTraversal.nextElementSibling')}}{{Spec2('Element Traversal')}}Added its initial definition to the ElementTraversal pure interface and use it on {{domxref("Element")}}.
+ +

Совместимость с браузерами

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
БраузерыChromeFirefox (Gecko)Internet ExplorerOperaSafari
Базовая поддержка ({{domxref("Element")}})4{{CompatGeckoDesktop("1.9.1")}}99.84
Поддержка {{domxref("CharacterData")}}29.0{{CompatGeckoDesktop("25")}} [1]{{CompatNo}}16.0{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
БраузерыAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базовая поддержка ( {{domxref("Element")}}){{CompatVersionUnknown}}{{CompatGeckoMobile("1.9.1")}}{{CompatVersionUnknown}}9.8{{CompatVersionUnknown}}
Поддержка {{domxref("CharacterData")}}{{CompatVersionUnknown}}{{CompatGeckoMobile("25")}}{{CompatNo}}16.0{{CompatNo}}
+
+ +

[1] Firefox 25 также добавил это свойство в {{domxref("DocumentType")}}, но оно было удалено в Firefox 28, из-за проблем совместимости.

+ +

См. также

+ + diff --git a/files/ru/web/api/element/previouselementsibling/index.html b/files/ru/web/api/element/previouselementsibling/index.html new file mode 100644 index 0000000000..2cc659ef51 --- /dev/null +++ b/files/ru/web/api/element/previouselementsibling/index.html @@ -0,0 +1,185 @@ +--- +title: NonDocumentTypeChildNode.previousElementSibling +slug: Web/API/NonDocumentTypeChildNode/previousElementSibling +translation_of: Web/API/NonDocumentTypeChildNode/previousElementSibling +--- +
+
{{APIRef("DOM")}}
+
+ +

Свойство NonDocumentTypeChildNode.previousElementSibling только для чтения возвращает  {{domxref("Element")}} элемент стоящий перед применяемым, из списка дочерних элементов родителя или возвращает null, если таковых не имеется.

+ +

Синтаксис

+ +
prevNode = elementNodeReference.previousElementSibling;
+
+ +

Примеры

+ +
<div id="div-01">Here is div-01</div>
+<div id="div-02">Here is div-02</div>
+<li>This is a list item</li>
+<li>This is another list item</li>
+<div id="div-03">Here is div-03</div>
+
+<script>
+  var el = document.getElementById('div-03').previousElementSibling;
+  document.write('<p>Siblings of div-03</p><ol>');
+  while (el) {
+    document.write('<li>' + el.nodeName + '</li>');
+    el = el.previousElementSibling;
+  }
+  document.write('</ol>');
+</script>
+
+ +

Этот пример выводит следующие элементы на страницу при загрузке:

+ +
Соседи div-03
+
+   1. LI
+   2. LI
+   3. DIV
+   4. DIV
+
+ +

Полифилл для Internet Explorer 8

+ +

Это свойство поддерживается начиная с версии IE9, поэтому следующий фрагмент поддерживается, и может использоваться для IE8:

+ +
// Ресурс: https://github.com/Alhadis/Snippets/blob/master/js/polyfills/IE8-child-elements.js
+if(!("previousElementSibling" in document.documentElement)){
+    Object.defineProperty(Element.prototype, "previousElementSibling", {
+        get: function(){
+            var e = this.previousSibling;
+            while(e && 1 !== e.nodeType)
+                e = e.previousSibling;
+            return e;
+        }
+    });
+}
+ +

Полифилл для  Internet Explorer 9+ и Safari

+ +
// Ресурс: https://github.com/jserz/js_piece/blob/master/DOM/NonDocumentTypeChildNode/previousElementSibling/previousElementSibling.md
+(function (arr) {
+  arr.forEach(function (item) {
+    if (item.hasOwnProperty('previousElementSibling')) {
+      return;
+    }
+    Object.defineProperty(item, 'previousElementSibling', {
+      configurable: true,
+      enumerable: true,
+      get: function () {
+        var el = this;
+        while (el = el.previousSibling) {
+          if (el.nodeType === 1) {
+            return el;
+          }
+        }
+        return null;
+      },
+      set: undefined
+    });
+  });
+})([Element.prototype, CharacterData.prototype]);
+ +

Спецификация

+ + + + + + + + + + + + + + + + + + + +
СпецификацияСтатусКомментарии
{{SpecName('DOM WHATWG', '#dom-nondocumenttypechildnode-previouselementsibling', 'NonDocumentTypeChildNode.previousElementSibling')}}{{Spec2('DOM WHATWG')}}Splitted the ElementTraversal interface in {{domxref("ChildNode")}}, {{domxref("ParentNode")}}, and {{domxref("NonDocumentTypeChildNode")}}. This method is now defined on the former.
+ The {{domxref("Element")}} and {{domxref("CharacterData")}} interfaces implemented the new interface.
{{SpecName('Element Traversal', '#attribute-previousElementSibling', 'ElementTraversal.previousElementSibling')}}{{Spec2('Element Traversal')}}Added its initial definition to the ElementTraversal pure interface and use it on {{domxref("Element")}}.
+ +

Поддержка браузерами

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
ФункционалChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support (on {{domxref("Element")}})4{{CompatGeckoDesktop("1.9.1")}}99.84
Support on {{domxref("CharacterData")}}29.0{{CompatGeckoDesktop("25")}} [1]{{CompatNo}}16.0{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
ФункционалAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support (on {{domxref("Element")}}){{CompatVersionUnknown}}{{CompatGeckoMobile("1.9.1")}}{{CompatVersionUnknown}}9.8{{CompatVersionUnknown}}
Support on {{domxref("CharacterData")}}{{CompatVersionUnknown}}{{CompatGeckoMobile("25")}}{{CompatNo}}16.0{{CompatNo}}
+
+ +

[1] Firefox 25 так же добавлено это свойство {{domxref("DocumentType")}}, но было удалено в Firefox 28 из-за проблем с совместимостью.

+ +

Смотрите так же

+ + diff --git a/files/ru/web/api/htmlanchorelement/hash/index.html b/files/ru/web/api/htmlanchorelement/hash/index.html new file mode 100644 index 0000000000..8a135ab828 --- /dev/null +++ b/files/ru/web/api/htmlanchorelement/hash/index.html @@ -0,0 +1,105 @@ +--- +title: HTMLHyperlinkElementUtils.hash +slug: Web/API/HTMLHyperlinkElementUtils/hash +tags: + - API + - Experimental + - HTMLHyperlinkElementUtils + - Property + - URL API +translation_of: Web/API/HTMLHyperlinkElementUtils/hash +--- +

{{ APIRef("URLUtils") }}

+ +

Свойство HTMLHyperlinkElementUtils.hash это {{domxref("USVString")}}, содержащий '#' с последующим идентификатором. Идентификатор не декодирован.

+ +

Синтаксис

+ +
string = object.hash;
+object.hash = string;
+
+ +

Примеры

+ +
// Допустим, что документ содержит элемент <a id="myAnchor" href="https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.href#youhou">
+var anchor = document.getElementByID("myAnchor");
+var result = anchor.hash; // Вернет: '#youhou'
+ +

Спецификации

+ + + + + + + + + + + + + + +
СпецификацияСтатусКомментарий
{{SpecName('HTML WHATWG', '#dom-hyperlink-hash', 'HTMLHyperlinkElementUtils.hash')}}{{Spec2('HTML WHATWG')}}Изначальное определение.
+ +

Совместимость с браузерами

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
ВозможностьChromeFirefox (Gecko)Internet ExplorerOperaSafari
Базовая поддержка{{CompatNo}}[1]{{CompatGeckoDesktop("22")}}[2]{{CompatNo}}[1]{{CompatNo}}[1]{{CompatNo}}[1]
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
ВозможностьAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базовая поддержка{{CompatNo}}[1]{{CompatNo}}[1]{{CompatGeckoMobile("22")}}[2]{{CompatNo}}[1]{{CompatNo}}[1]{{CompatNo}}[1]
+
+ +

[1] Хотя оно и не включено в один абстрактный интерфейс, это свойство напрямую доступно в интерфейсах, которые его реализуют.

+ +

[2] С Gecko 22 по Gecko 44, это свойство находилось в URLUtils. Оно было перемещено или в HTMLHyperlinkElementUtils, или напрямую в интерфейс. Также с Gecko 29 по Gecko 40 значение ошибочно возвращалось декодированным.

+ +

Смотрите также

+ + diff --git a/files/ru/web/api/htmlanchorelement/host/index.html b/files/ru/web/api/htmlanchorelement/host/index.html new file mode 100644 index 0000000000..742386e83b --- /dev/null +++ b/files/ru/web/api/htmlanchorelement/host/index.html @@ -0,0 +1,116 @@ +--- +title: HTMLHyperlinkElementUtils.host +slug: Web/API/HTMLHyperlinkElementUtils/host +tags: + - API + - Experimental + - HTMLHyperlinkElementUtils + - Property + - URL API +translation_of: Web/API/HTMLHyperlinkElementUtils/host +--- +
{{ApiRef("URL API")}}
+ +

Свойство HTMLHyperlinkElementUtils.host это {{domxref("USVString")}}, содержащий хост, а именно имя хоста и, если порт не пустой, ':' и порт.

+ +

Синтаксис

+ +
string = object.host;
+object.host = string;
+
+ +

Примеры

+ +
var anchor = document.createElement("a");
+
+anchor.href = "https://developer.mozilla.org/en-US/HTMLHyperlinkElementUtils.host"
+anchor.host == "developer.mozilla.org"
+
+anchor.href = "https://developer.mozilla.org:443/en-US/HTMLHyperlinkElementUtils.host"
+anchor.host == "developer.mozilla.org"
+// Номер порта пропущен, потому что 443 используется по умолчанию
+
+anchor.href = "https://developer.mozilla.org:4097/en-US/HTMLHyperlinkElementUtils.host"
+anchor.host == "developer.mozilla.org:4097"
+
+ +

Спецификации

+ + + + + + + + + + + + + + +
СпецификацияСтатусКомментарий
{{SpecName('HTML WHATWG', '#dom-hyperlink-host', 'HTMLHyperlinkElementUtils.host')}}{{Spec2('HTML WHATWG')}}Изначальное определение.
+ +

Совместимость с браузерами

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
ВозможностьChromeFirefox (Gecko)Internet ExplorerOperaSafari
Базовая поддержка[1]{{CompatNo}}{{CompatGeckoDesktop("22")}} [3]{{CompatNo}}[2]{{CompatNo}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
ВозможностьAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базовая поддержка[1]{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("22")}} [3]{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

[1] Хотя оно и не включено в один абстрактный интерфейс, это свойство напрямую доступно в интерфейсах, которые его реализуют.

+ +

[2] В Internet Explorer 9 свойство host элемента {{HTMLElement("a")}} всегда включает порт (т.е. developer.mozilla.org:443), даже если порт в href не указан явно.

+ +

[3] С Gecko 22 по Gecko 44, это свойство находилось в URLUtils. Оно было перемещено или в HTMLHyperlinkElementUtils, или напрямую в интерфейс.

+ +

Смотрите также

+ + diff --git a/files/ru/web/api/htmlanchorelement/hostname/index.html b/files/ru/web/api/htmlanchorelement/hostname/index.html new file mode 100644 index 0000000000..da06c3dcb6 --- /dev/null +++ b/files/ru/web/api/htmlanchorelement/hostname/index.html @@ -0,0 +1,105 @@ +--- +title: HTMLHyperlinkElementUtils.hostname +slug: Web/API/HTMLHyperlinkElementUtils/hostname +tags: + - API + - Experimental + - HTMLHyperlinkElementUtils + - Property + - URL API +translation_of: Web/API/HTMLHyperlinkElementUtils/hostname +--- +

{{ApiRef("URL API")}}

+ +

Свойство HTMLHyperlinkElementUtils.hostname это {{domxref("USVString")}}, содержащий домен.

+ +

Синтаксис

+ +
string = object.hostname;
+object.hostname = string;
+
+ +

Примеры

+ +
// Допустим, что документ содержит элемент <a id="myAnchor" href="https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.hostname">
+var anchor = document.getElementByID("myAnchor");
+var result = anchor.hostname; // Вернет: 'developer.mozilla.org'
+ +

Спецификации

+ + + + + + + + + + + + + + +
СпецификацияСтатусКомментарий
{{SpecName('HTML WHATWG', '#dom-hyperlink-protocol', 'URLUtils.hostname')}}{{Spec2('HTML WHATWG')}}Изначальное определение.
+ +

Совместимость с браузерами

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
ВозможностьChromeFirefox (Gecko)Internet ExplorerOperaSafari
Базовая поддержка{{CompatNo}} [1]{{CompatGeckoDesktop("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
ВозможностьAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базовая поддержка{{CompatNo}} [1]{{CompatNo}} [1]{{CompatGeckoMobile("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
+
+ +

[1] Хотя оно и не включено в один абстрактный интерфейс, это свойство напрямую доступно в интерфейсах, которые его реализуют.

+ +

[2] С Gecko 22 по Gecko 44, это свойство находилось в URLUtils. Оно было перемещено или в HTMLHyperlinkElementUtils, или напрямую в интерфейс.

+ +

Смотрите также

+ + diff --git a/files/ru/web/api/htmlanchorelement/href/index.html b/files/ru/web/api/htmlanchorelement/href/index.html new file mode 100644 index 0000000000..03a52f2e51 --- /dev/null +++ b/files/ru/web/api/htmlanchorelement/href/index.html @@ -0,0 +1,108 @@ +--- +title: HTMLHyperlinkElementUtils.href +slug: Web/API/HTMLHyperlinkElementUtils/href +tags: + - API + - Experimental + - HTMLHyperlinkElementUtils + - Location + - Property + - Reference + - URL API +translation_of: Web/API/HTMLHyperlinkElementUtils/href +--- +

{{ApiRef("URL API")}}

+ +

Свойство HTMLHyperlinkElementUtils.href это {{domxref("USVString")}}, содержащий URL целиком.

+ +

Синтаксис

+ +
string = object.href;
+object.href = string;
+
+ +

Примеры

+ +
// Допустим, что документ содержит элемент <a id="myAnchor" href="https://developer.mozilla.org/en-US/HTMLHyperlinkElementUtils/href">
+var anchor = document.getElementById("myAnchor");
+var result = anchor.href; // Вернет: 'https://developer.mozilla.org/en-US/HTMLHyperlinkElementUtils/href'
+
+ +

Спецификации

+ + + + + + + + + + + + + + +
СпецификацияСтатусКомментарий
{{SpecName('HTML WHATWG', '#dom-hyperlink-href', 'HTMLHyperlinkElementUtils.href')}}{{Spec2('HTML WHATWG')}}Изначальное определение.
+ +

Совместимость с браузерами

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
ВозможностьChromeFirefox (Gecko)Internet ExplorerOperaSafari
Базовая поддержка{{CompatNo}} [1]{{CompatGeckoDesktop("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
ВозможностьAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базовая поддержка{{CompatNo}} [1]{{CompatNo}} [1]{{CompatGeckoMobile("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
+
+ +

[1] Хотя оно и не включено в один абстрактный интерфейс, это свойство напрямую доступно в интерфейсах, которые его реализуют.

+ +

[2] С Gecko 22 по Gecko 44, это свойство находилось в URLUtils. Оно было перемещено или в HTMLHyperlinkElementUtils, или напрямую в интерфейс.

+ +

Смотрите также

+ + diff --git a/files/ru/web/api/htmlanchorelement/origin/index.html b/files/ru/web/api/htmlanchorelement/origin/index.html new file mode 100644 index 0000000000..b0e6b46e2e --- /dev/null +++ b/files/ru/web/api/htmlanchorelement/origin/index.html @@ -0,0 +1,116 @@ +--- +title: HTMLHyperlinkElementUtils.origin +slug: Web/API/HTMLHyperlinkElementUtils/origin +tags: + - API + - Experimental + - HTMLHyperlinkElementUtils + - Property + - Read-only + - Reference + - URL API +translation_of: Web/API/HTMLHyperlinkElementUtils/origin +--- +

{{APIRef("URL API")}}

+ +

Свойство только для чтения HTMLHyperlinkElementUtils.origin это {{domxref("USVString")}}, содержащий сериализованные в Unicode протокол, хост и порт, а именно:

+ + + +

{{AvailableInWorkers}}

+ +

Синтаксис

+ +
string = object.origin;
+
+ +

Примеры

+ +
// На этой странице
+var result = window.location.origin; // Вернет: 'https://developer.mozilla.org'
+
+ +

Спецификации

+ + + + + + + + + + + + + + +
СпецификацияСтатусКомментарий
{{SpecName('HTML WHATWG', '#dom-hyperlink-origin', 'HTMLHyperlinkElementUtils.origin')}}{{Spec2('HTML WHATWG')}}Изначальное определение.
+ +

Совместимость с браузерами

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
ВозможностьChromeFirefox (Gecko)Internet ExplorerOperaSafari
Базовая поддержка{{CompatVersionUnknown()}}{{CompatGeckoDesktop("26.0")}} [2][3]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
ВозможностьAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базовая поддержка{{CompatNo}} [1]{{CompatNo}} [1]{{CompatGeckoMobile("26.0")}} [2][3]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
+
+ +

[1] Хотя оно и не включено в один абстрактный интерфейс, это свойство напрямую доступно в интерфейсах, которые его реализуют.

+ +

[2] С Gecko 26 по Gecko 44, это свойство находилось в URLUtils. Оно было перемещено или в HTMLHyperlinkElementUtils, или напрямую в интерфейс.

+ +

[3] До Gecko 49, для URL, начинающихся с blob, ошибочно возвращался null.

+ +

Смотрите также

+ + diff --git a/files/ru/web/api/htmlanchorelement/password/index.html b/files/ru/web/api/htmlanchorelement/password/index.html new file mode 100644 index 0000000000..668749a367 --- /dev/null +++ b/files/ru/web/api/htmlanchorelement/password/index.html @@ -0,0 +1,106 @@ +--- +title: HTMLHyperlinkElementUtils.password +slug: Web/API/HTMLHyperlinkElementUtils/password +tags: + - API + - Experimental + - HTMLHyperlinkElementUtils + - Property + - URL API +translation_of: Web/API/HTMLHyperlinkElementUtils/password +--- +

{{ApiRef("URL API")}}

+ +

Свойство HTMLHyperlinkElementUtils.password это {{domxref("USVString")}}, содержащий пароль, указанный перед именем домена.

+ +

password игнорируется без предупреждения, если свойство username не установлено.

+ +

Синтаксис

+ +
string = object.password;
+object.password = string;
+
+ +

Примеры

+ +
// Допустим, что документ содержит элемент <a id="myAnchor" href="https://anonymous:flabada@developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.username">
+var anchor = document.getElementByID("myAnchor");
+var result = anchor.password; // Вернет: 'flabada'
+
+ +

Спецификации

+ + + + + + + + + + + + + + +
СпецификацияСтатусКомментарий
{{SpecName('HTML WHATWG', '#dom-hyperlink-prassword', 'HTMLHyperlinkElementUtils.password')}}{{Spec2('HTML WHATWG')}}Изначальное определение.
+ +

Совместимость с браузерами

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
ВозможностьChromeFirefox (Gecko)Internet ExplorerOperaSafari
Базовая поддержка{{CompatNo}}{{CompatGeckoDesktop("26")}} [1]{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
ВозможностьAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базовая поддержка{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("26")}} [1]{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

[1] С Gecko 26 по Gecko 44, это свойство находилось в URLUtils. Оно было перемещено или в HTMLHyperlinkElementUtils, или напрямую в интерфейс.

+ +

Смотрите также

+ + diff --git a/files/ru/web/api/htmlanchorelement/pathname/index.html b/files/ru/web/api/htmlanchorelement/pathname/index.html new file mode 100644 index 0000000000..9f6fb68608 --- /dev/null +++ b/files/ru/web/api/htmlanchorelement/pathname/index.html @@ -0,0 +1,106 @@ +--- +title: HTMLHyperlinkElementUtils.pathname +slug: Web/API/HTMLHyperlinkElementUtils/pathname +tags: + - API + - Experimental + - HTMLHyperlinkElementUtils + - Property + - URL API +translation_of: Web/API/HTMLHyperlinkElementUtils/pathname +--- +

{{ApiRef("URL API")}}

+ +

Свойство HTMLHyperlinkElementUtils.pathname это {{domxref("USVString")}}, содержащий первый '/' после хоста с последующим текстом URL.

+ +

Синтаксис

+ +
string = object.pathname;
+object.pathname = string;
+
+ +

Примеры

+ +
// Допустим, что документ содержит элемент <a id="myAnchor" href="https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.pathname">
+var anchor = document.getElementById("myAnchor");
+var result = anchor.pathname; // Вернет: '/en-US/docs/HTMLHyperlinkElementUtils.pathname'
+
+ +

Спецификации

+ + + + + + + + + + + + + + +
СпецификацияСтатусКомментарий
{{SpecName('HTML WHATWG', '#dom-hyperlink-pathname', 'HTMLHyperlinkElementUtils.pathname')}}{{Spec2('HTML WHATWG')}}Изначальное определение.
+ +

Совместимость с браузерами

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
ВозможностьChromeFirefox (Gecko)Internet ExplorerOperaSafari
Базовая поддержка{{CompatNo}} [1]{{CompatGeckoDesktop("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
ВозможностьAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базовая поддержка{{CompatNo}} [1]{{CompatNo}} [1]{{CompatGeckoMobile("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
+
+ +

[1] Хотя оно и не включено в один абстрактный интерфейс, это свойство напрямую доступно в интерфейсах, которые его реализуют.

+ +

[2] С Gecko 22 по Gecko 44, это свойство находилось в URLUtils. Оно было перемещено или в HTMLHyperlinkElementUtils, или напрямую в интерфейс.

+ +

Смотрите также

+ + diff --git a/files/ru/web/api/htmlanchorelement/port/index.html b/files/ru/web/api/htmlanchorelement/port/index.html new file mode 100644 index 0000000000..2ab4461fc4 --- /dev/null +++ b/files/ru/web/api/htmlanchorelement/port/index.html @@ -0,0 +1,108 @@ +--- +title: HTMLHyperlinkElementUtils.port +slug: Web/API/HTMLHyperlinkElementUtils/port +tags: + - API + - Experimental + - HTMLHyperlinkElementUtils + - Property + - URL API +translation_of: Web/API/HTMLHyperlinkElementUtils/port +--- +

{{ApiRef("URL API")}}

+ +

Свойство HTMLHyperlinkElementUtils.port это {{domxref("USVString")}}, содержащий номер порта.

+ +

При значении '' будет использоваться порт по умолчанию для указанного протокола (не 0).

+ +

Синтаксис

+ +
string = object.port;
+object.port = string;
+
+ +

Примеры

+ +
// Допустим, что документ содержит элемент <a id="myAnchor" href="https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.port">
+var anchor = document.getElementByID("myAnchor");
+var result = anchor.port; // Вернет: '80'
+
+ +

Спецификации

+ + + + + + + + + + + + + + +
СпецификацияСтатусКомментарий
{{SpecName('HTML WHATWG', '#dom-hyperlink-port', 'HTMLHyperlinkElementUtils.port')}}{{Spec2('HTML WHATWG')}}Изначальное определение.
+ +

Совместимость с браузерами

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
ВозможностьChromeFirefox (Gecko)Internet ExplorerOperaSafari
Базовая поддержка{{CompatNo}} [1]{{CompatGeckoDesktop("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
ВозможностьAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базовая поддержка{{CompatNo}} [1]{{CompatNo}} [1]{{CompatGeckoMobile("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
+
+ +

[1] Хотя оно и не включено в один абстрактный интерфейс, это свойство напрямую доступно в интерфейсах, которые его реализуют.

+ +

[2] С Gecko 22 по Gecko 44, это свойство находилось в URLUtils. Оно было перемещено или в HTMLHyperlinkElementUtils, или напрямую в интерфейс.

+ +

Смотрите также

+ + diff --git a/files/ru/web/api/htmlanchorelement/protocol/index.html b/files/ru/web/api/htmlanchorelement/protocol/index.html new file mode 100644 index 0000000000..d7b3b4327f --- /dev/null +++ b/files/ru/web/api/htmlanchorelement/protocol/index.html @@ -0,0 +1,106 @@ +--- +title: HTMLHyperlinkElementUtils.protocol +slug: Web/API/HTMLHyperlinkElementUtils/protocol +tags: + - API + - Experimental + - HTMLHyperlinkElementUtils + - Property + - URL API +translation_of: Web/API/HTMLHyperlinkElementUtils/protocol +--- +

{{ApiRef("URL API")}}

+ +

Свойство HTMLHyperlinkElementUtils.protocol это {{domxref("USVString")}}, содержащий протокол URL включая ':' в конце.

+ +

Синтаксис

+ +
string = object.protocol;
+object.protocol = string;
+
+ +

Примеры

+ +
// Допустим, что документ содержит элемент <a id="myAnchor" href="https://developer.mozilla.org/en-US/HTMLHyperlinkElementUtils.protocol">
+var anchor = document.getElementByID("myAnchor");
+var result = anchor.protocol; // Вернет: 'https:'
+
+ +

Спецификации

+ + + + + + + + + + + + + + +
СпецификацияСтатусКомментарий
{{SpecName('HTML WHATWG', '#dom-hyperlink-protocol', 'HTMLHyperlinkElementUtils.protocol')}}{{Spec2('HTML WHATWG')}}Изначальное определение.
+ +

Совместимость с браузерами

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
ВозможностьChromeFirefox (Gecko)Internet ExplorerOperaSafari
Базовая поддержка{{CompatNo}} [1]{{CompatGeckoDesktop("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
ВозможностьAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базовая поддержка{{CompatNo}} [1]{{CompatNo}} [1]{{CompatGeckoMobile("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
+
+ +

[1] Хотя оно и не включено в один абстрактный интерфейс, это свойство напрямую доступно в интерфейсах, которые его реализуют.

+ +

[2] С Gecko 22 по Gecko 44, это свойство находилось в URLUtils. Оно было перемещено или в HTMLHyperlinkElementUtils, или напрямую в интерфейс.

+ +

Смотрите также

+ + diff --git a/files/ru/web/api/htmlanchorelement/search/index.html b/files/ru/web/api/htmlanchorelement/search/index.html new file mode 100644 index 0000000000..7c23ed4fc8 --- /dev/null +++ b/files/ru/web/api/htmlanchorelement/search/index.html @@ -0,0 +1,106 @@ +--- +title: HTMLHyperlinkElementUtils.search +slug: Web/API/HTMLHyperlinkElementUtils/search +tags: + - API + - Experimental + - HTMLHyperlinkElementUtils + - Property + - URL API +translation_of: Web/API/HTMLHyperlinkElementUtils/search +--- +

{{ApiRef("URL API")}}

+ +

Свойство HTMLHyperlinkElementUtils.search это {{domxref("USVString")}}, содержащий '?' с последующими параметрами URL.

+ +

Синтаксис

+ +
string = object.search;
+object.search = string;
+
+ +

Примеры

+ +
// Допустим, что документ содержит элемент <a id="myAnchor" href="https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.search?q=123">
+var anchor = document.getElementById("myAnchor");
+var result = anchor.search; // Вернет: '?q=123'
+
+ +

Спецификации

+ + + + + + + + + + + + + + +
СпецификацияСтатусКомментарий
{{SpecName('HTML WHATWG', '#dom-hyperlink-search', 'HTMLHyperlinkElementUtils.search')}}{{Spec2('HTML WHATWG')}}Изначальное определение.
+ +

Совместимость с браузерами

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
ВозможностьChromeFirefox (Gecko)Internet ExplorerOperaSafari
Базовая поддержка{{CompatVersionUnknown}} [1]{{CompatGeckoDesktop("22")}} [2]{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}} [1]
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
ВозможностьAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базовая поддержка{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}} [1]{{CompatGeckoMobile("22")}} [2]{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}} [1]
+
+ +

[1] Хотя оно и не включено в один абстрактный интерфейс, это свойство напрямую доступно в интерфейсах, которые его реализуют.

+ +

[2] С Gecko 22 по Gecko 44, это свойство находилось в URLUtils. Оно было перемещено или в HTMLHyperlinkElementUtils, или напрямую в интерфейс.

+ +

Смотрите также

+ + diff --git a/files/ru/web/api/htmlanchorelement/tostring/index.html b/files/ru/web/api/htmlanchorelement/tostring/index.html new file mode 100644 index 0000000000..aa8d9362c0 --- /dev/null +++ b/files/ru/web/api/htmlanchorelement/tostring/index.html @@ -0,0 +1,106 @@ +--- +title: HTMLHyperlinkElementUtils.toString() +slug: Web/API/HTMLHyperlinkElementUtils/toString +tags: + - API + - Experimental + - HTMLHyperlinkElementUtils + - Location + - Method + - Stringifier + - URL API +translation_of: Web/API/HTMLHyperlinkElementUtils/toString +--- +

{{ApiRef("URL API")}}

+ +

Метод HTMLHyperlinkElementUtils.toString() возвращает {{domxref("USVString")}}, содержащий URL целиком. Это версия {{domxref("HTMLHyperlinkElementUtils.href")}} только для чтения.

+ +

Синтаксис

+ +
string = object.toString();
+ +

Примеры

+ +
// Допустим, что документ содержит элемент <a id="myAnchor" href="https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils/toString">
+var anchor = document.getElementById("myAnchor");
+var result = anchor.toString(); // Вернет: 'https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils/toString'
+
+ +

Спецификации

+ + + + + + + + + + + + + + +
СпецификацияСтатусКомментарий
{{SpecName('HTML WHATWG', '#htmlhyperlinkelementutils', 'HTMLHyperlinkElementUtils.toString()')}}{{Spec2('HTML WHATWG')}}Изначальное определение.
+ +

Совместимость с браузерами

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
ВозможностьChromeFirefox (Gecko)Internet ExplorerOperaSafari
Базовая поддержка{{CompatNo}} [1]{{CompatGeckoDesktop("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
ВозможностьAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базовая поддержка{{CompatNo}} [1]{{CompatNo}} [1]{{CompatGeckoMobile("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
+
+ +

[1] Хотя оно и не включено в один абстрактный интерфейс, это свойство напрямую доступно в интерфейсах, которые его реализуют.

+ +

[2] С Gecko 22 по Gecko 44, это свойство находилось в URLUtils. Оно было перемещено или в HTMLHyperlinkElementUtils, или напрямую в интерфейс.

+ +

Смотрите также

+ + diff --git a/files/ru/web/api/htmlanchorelement/username/index.html b/files/ru/web/api/htmlanchorelement/username/index.html new file mode 100644 index 0000000000..c4da9f8b58 --- /dev/null +++ b/files/ru/web/api/htmlanchorelement/username/index.html @@ -0,0 +1,104 @@ +--- +title: HTMLHyperlinkElementUtils.username +slug: Web/API/HTMLHyperlinkElementUtils/username +tags: + - API + - Experimental + - HTMLHyperlinkElementUtils + - Property + - URL API +translation_of: Web/API/HTMLHyperlinkElementUtils/username +--- +

{{ApiRef("URL API")}}

+ +

Свойство HTMLHyperlinkElementUtils.username это {{domxref("USVString")}}, содержащий имя пользователя, указанное перед именем домена.

+ +

Синтаксис

+ +
string = object.username;
+object.username = string;
+
+ +

Примеры

+ +
// Допустим, что документ содержит элемент <a id="myAnchor" href="https://anonymous:flabada@developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.username">
+var anchor = document.getElementByID("myAnchor");
+var result = anchor.username; // Вернет: 'anonymous'
+
+ +

Спецификации

+ + + + + + + + + + + + + + +
СпецификацияСтатусКомментарий
{{SpecName('HTML WHATWG', '#dom-hyperlink-username', 'HTMLHyperlinkElementUtils.username')}}{{Spec2('HTML WHATWG')}}Изначальное определение.
+ +

Совместимость с браузерами

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
ВозможностьChromeFirefox (Gecko)Internet ExplorerOperaSafari
Базовая поддержка{{CompatNo}}{{CompatGeckoDesktop("26")}} [1]{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
ВозможностьAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базовая поддержка{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("26")}} [1]{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

[1] С Gecko 26 по Gecko 44, это свойство находилось в URLUtils. Оно было перемещено или в HTMLHyperlinkElementUtils, или напрямую в интерфейс.

+ +

Смотрите также

+ + diff --git a/files/ru/web/api/htmlhyperlinkelementutils/hash/index.html b/files/ru/web/api/htmlhyperlinkelementutils/hash/index.html deleted file mode 100644 index 8a135ab828..0000000000 --- a/files/ru/web/api/htmlhyperlinkelementutils/hash/index.html +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.hash -slug: Web/API/HTMLHyperlinkElementUtils/hash -tags: - - API - - Experimental - - HTMLHyperlinkElementUtils - - Property - - URL API -translation_of: Web/API/HTMLHyperlinkElementUtils/hash ---- -

{{ APIRef("URLUtils") }}

- -

Свойство HTMLHyperlinkElementUtils.hash это {{domxref("USVString")}}, содержащий '#' с последующим идентификатором. Идентификатор не декодирован.

- -

Синтаксис

- -
string = object.hash;
-object.hash = string;
-
- -

Примеры

- -
// Допустим, что документ содержит элемент <a id="myAnchor" href="https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.href#youhou">
-var anchor = document.getElementByID("myAnchor");
-var result = anchor.hash; // Вернет: '#youhou'
- -

Спецификации

- - - - - - - - - - - - - - -
СпецификацияСтатусКомментарий
{{SpecName('HTML WHATWG', '#dom-hyperlink-hash', 'HTMLHyperlinkElementUtils.hash')}}{{Spec2('HTML WHATWG')}}Изначальное определение.
- -

Совместимость с браузерами

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - -
ВозможностьChromeFirefox (Gecko)Internet ExplorerOperaSafari
Базовая поддержка{{CompatNo}}[1]{{CompatGeckoDesktop("22")}}[2]{{CompatNo}}[1]{{CompatNo}}[1]{{CompatNo}}[1]
-
- -
- - - - - - - - - - - - - - - - - - - - - -
ВозможностьAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базовая поддержка{{CompatNo}}[1]{{CompatNo}}[1]{{CompatGeckoMobile("22")}}[2]{{CompatNo}}[1]{{CompatNo}}[1]{{CompatNo}}[1]
-
- -

[1] Хотя оно и не включено в один абстрактный интерфейс, это свойство напрямую доступно в интерфейсах, которые его реализуют.

- -

[2] С Gecko 22 по Gecko 44, это свойство находилось в URLUtils. Оно было перемещено или в HTMLHyperlinkElementUtils, или напрямую в интерфейс. Также с Gecko 29 по Gecko 40 значение ошибочно возвращалось декодированным.

- -

Смотрите также

- - diff --git a/files/ru/web/api/htmlhyperlinkelementutils/host/index.html b/files/ru/web/api/htmlhyperlinkelementutils/host/index.html deleted file mode 100644 index 742386e83b..0000000000 --- a/files/ru/web/api/htmlhyperlinkelementutils/host/index.html +++ /dev/null @@ -1,116 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.host -slug: Web/API/HTMLHyperlinkElementUtils/host -tags: - - API - - Experimental - - HTMLHyperlinkElementUtils - - Property - - URL API -translation_of: Web/API/HTMLHyperlinkElementUtils/host ---- -
{{ApiRef("URL API")}}
- -

Свойство HTMLHyperlinkElementUtils.host это {{domxref("USVString")}}, содержащий хост, а именно имя хоста и, если порт не пустой, ':' и порт.

- -

Синтаксис

- -
string = object.host;
-object.host = string;
-
- -

Примеры

- -
var anchor = document.createElement("a");
-
-anchor.href = "https://developer.mozilla.org/en-US/HTMLHyperlinkElementUtils.host"
-anchor.host == "developer.mozilla.org"
-
-anchor.href = "https://developer.mozilla.org:443/en-US/HTMLHyperlinkElementUtils.host"
-anchor.host == "developer.mozilla.org"
-// Номер порта пропущен, потому что 443 используется по умолчанию
-
-anchor.href = "https://developer.mozilla.org:4097/en-US/HTMLHyperlinkElementUtils.host"
-anchor.host == "developer.mozilla.org:4097"
-
- -

Спецификации

- - - - - - - - - - - - - - -
СпецификацияСтатусКомментарий
{{SpecName('HTML WHATWG', '#dom-hyperlink-host', 'HTMLHyperlinkElementUtils.host')}}{{Spec2('HTML WHATWG')}}Изначальное определение.
- -

Совместимость с браузерами

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - -
ВозможностьChromeFirefox (Gecko)Internet ExplorerOperaSafari
Базовая поддержка[1]{{CompatNo}}{{CompatGeckoDesktop("22")}} [3]{{CompatNo}}[2]{{CompatNo}}{{CompatNo}}
-
- -
- - - - - - - - - - - - - - - - - - - - - -
ВозможностьAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базовая поддержка[1]{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("22")}} [3]{{CompatNo}}{{CompatNo}}{{CompatNo}}
-
- -

[1] Хотя оно и не включено в один абстрактный интерфейс, это свойство напрямую доступно в интерфейсах, которые его реализуют.

- -

[2] В Internet Explorer 9 свойство host элемента {{HTMLElement("a")}} всегда включает порт (т.е. developer.mozilla.org:443), даже если порт в href не указан явно.

- -

[3] С Gecko 22 по Gecko 44, это свойство находилось в URLUtils. Оно было перемещено или в HTMLHyperlinkElementUtils, или напрямую в интерфейс.

- -

Смотрите также

- - diff --git a/files/ru/web/api/htmlhyperlinkelementutils/hostname/index.html b/files/ru/web/api/htmlhyperlinkelementutils/hostname/index.html deleted file mode 100644 index da06c3dcb6..0000000000 --- a/files/ru/web/api/htmlhyperlinkelementutils/hostname/index.html +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.hostname -slug: Web/API/HTMLHyperlinkElementUtils/hostname -tags: - - API - - Experimental - - HTMLHyperlinkElementUtils - - Property - - URL API -translation_of: Web/API/HTMLHyperlinkElementUtils/hostname ---- -

{{ApiRef("URL API")}}

- -

Свойство HTMLHyperlinkElementUtils.hostname это {{domxref("USVString")}}, содержащий домен.

- -

Синтаксис

- -
string = object.hostname;
-object.hostname = string;
-
- -

Примеры

- -
// Допустим, что документ содержит элемент <a id="myAnchor" href="https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.hostname">
-var anchor = document.getElementByID("myAnchor");
-var result = anchor.hostname; // Вернет: 'developer.mozilla.org'
- -

Спецификации

- - - - - - - - - - - - - - -
СпецификацияСтатусКомментарий
{{SpecName('HTML WHATWG', '#dom-hyperlink-protocol', 'URLUtils.hostname')}}{{Spec2('HTML WHATWG')}}Изначальное определение.
- -

Совместимость с браузерами

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - -
ВозможностьChromeFirefox (Gecko)Internet ExplorerOperaSafari
Базовая поддержка{{CompatNo}} [1]{{CompatGeckoDesktop("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
-
- -
- - - - - - - - - - - - - - - - - - - - - -
ВозможностьAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базовая поддержка{{CompatNo}} [1]{{CompatNo}} [1]{{CompatGeckoMobile("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
-
- -

[1] Хотя оно и не включено в один абстрактный интерфейс, это свойство напрямую доступно в интерфейсах, которые его реализуют.

- -

[2] С Gecko 22 по Gecko 44, это свойство находилось в URLUtils. Оно было перемещено или в HTMLHyperlinkElementUtils, или напрямую в интерфейс.

- -

Смотрите также

- - diff --git a/files/ru/web/api/htmlhyperlinkelementutils/href/index.html b/files/ru/web/api/htmlhyperlinkelementutils/href/index.html deleted file mode 100644 index 03a52f2e51..0000000000 --- a/files/ru/web/api/htmlhyperlinkelementutils/href/index.html +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.href -slug: Web/API/HTMLHyperlinkElementUtils/href -tags: - - API - - Experimental - - HTMLHyperlinkElementUtils - - Location - - Property - - Reference - - URL API -translation_of: Web/API/HTMLHyperlinkElementUtils/href ---- -

{{ApiRef("URL API")}}

- -

Свойство HTMLHyperlinkElementUtils.href это {{domxref("USVString")}}, содержащий URL целиком.

- -

Синтаксис

- -
string = object.href;
-object.href = string;
-
- -

Примеры

- -
// Допустим, что документ содержит элемент <a id="myAnchor" href="https://developer.mozilla.org/en-US/HTMLHyperlinkElementUtils/href">
-var anchor = document.getElementById("myAnchor");
-var result = anchor.href; // Вернет: 'https://developer.mozilla.org/en-US/HTMLHyperlinkElementUtils/href'
-
- -

Спецификации

- - - - - - - - - - - - - - -
СпецификацияСтатусКомментарий
{{SpecName('HTML WHATWG', '#dom-hyperlink-href', 'HTMLHyperlinkElementUtils.href')}}{{Spec2('HTML WHATWG')}}Изначальное определение.
- -

Совместимость с браузерами

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - -
ВозможностьChromeFirefox (Gecko)Internet ExplorerOperaSafari
Базовая поддержка{{CompatNo}} [1]{{CompatGeckoDesktop("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
-
- -
- - - - - - - - - - - - - - - - - - - - - -
ВозможностьAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базовая поддержка{{CompatNo}} [1]{{CompatNo}} [1]{{CompatGeckoMobile("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
-
- -

[1] Хотя оно и не включено в один абстрактный интерфейс, это свойство напрямую доступно в интерфейсах, которые его реализуют.

- -

[2] С Gecko 22 по Gecko 44, это свойство находилось в URLUtils. Оно было перемещено или в HTMLHyperlinkElementUtils, или напрямую в интерфейс.

- -

Смотрите также

- - diff --git a/files/ru/web/api/htmlhyperlinkelementutils/index.html b/files/ru/web/api/htmlhyperlinkelementutils/index.html deleted file mode 100644 index 2abe580d83..0000000000 --- a/files/ru/web/api/htmlhyperlinkelementutils/index.html +++ /dev/null @@ -1,178 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils -slug: Web/API/HTMLHyperlinkElementUtils -tags: - - API - - Experimental - - Mixin - - NeedsTranslation - - TopicStub - - URL API -translation_of: Web/API/HTMLHyperlinkElementUtils ---- -

{{ApiRef("URL API")}}{{SeeCompatTable}}

- -

The HTMLHyperlinkElementUtils mixin defines utility methods and properties to work with {{domxref("HTMLAnchorElement")}} and {{domxref("HTMLAreaElement")}}. These utilities allow to deal with common features like URLs.

- -

There are no objects of this type, but several objects {{domxref("HTMLAnchorElement")}} and {{domxref("HTMLAreaElement")}} implement it.

- -

Properties

- -

This interface doesn't inherit any property.

- -
-
{{domxref("HTMLHyperlinkElementUtils.href")}}
-
Is a {{domxref("USVString")}} containing the whole URL.
-
{{domxref("HTMLHyperlinkElementUtils.protocol")}}
-
Is a {{domxref("USVString")}} containing the protocol scheme of the URL, including the final ':'.
-
{{domxref("HTMLHyperlinkElementUtils.host")}}
-
Is a {{domxref("USVString")}} containing the host, that is the hostname, and then, if the port of the URL is not empty (which can happen because it was not specified or because it was specified to be the default port of the URL's scheme), a ':', and the port of the URL.
-
{{domxref("HTMLHyperlinkElementUtils.hostname")}}
-
Is a {{domxref("USVString")}} containing the domain of the URL.
-
{{domxref("HTMLHyperlinkElementUtils.port")}}
-
Is a {{domxref("USVString")}} containing the port number of the URL.
-
{{domxref("HTMLHyperlinkElementUtils.pathname")}}
-
Is a {{domxref("USVString")}} containing an initial '/' followed by the path of the URL.
-
{{domxref("HTMLHyperlinkElementUtils.search")}}
-
Is a {{domxref("USVString")}} containing a '?' followed by the parameters of the URL.
-
{{domxref("HTMLHyperlinkElementUtils.hash")}}
-
Is a {{domxref("USVString")}} containing a '#' followed by the fragment identifier of the URL.
-
{{domxref("HTMLHyperlinkElementUtils.username")}}
-
Is a {{domxref("USVString")}} containing the username specified before the domain name.
-
{{domxref("HTMLHyperlinkElementUtils.password")}}
-
Is a {{domxref("USVString")}} containing the password specified before the domain name.
-
{{domxref("HTMLHyperlinkElementUtils.origin")}} {{readonlyInline}}
-
Returns a {{domxref("USVString")}} containing the origin of the URL, that is its scheme, its domain and its port.
-
- -

Methods

- -

This interface doesn't inherit any method.

- -
-
{{domxref("HTMLHyperlinkElementUtils.toString()")}}
-
Returns a {{domxref("DOMString")}} containing the whole URL. It is a synonym for {{domxref("HTMLHyperlinkElementUtils.href")}}, though it can't be used to modify the value.
-
- -

Specifications

- - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML WHATWG', '#htmlhyperlinkelementutils', 'HTMLHyperlinkElementUtils')}}{{Spec2('HTML WHATWG')}}Initial definition
- -

Browser compatibility

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatNo}} [1]{{CompatGeckoDesktop("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
username and password{{CompatUnknown}}{{CompatGeckoDesktop("26")}} [2]{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}
origin {{CompatVersionUnknown()}}{{CompatGeckoDesktop("26")}} [2]{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatNo}} [1]{{CompatNo}} [1]{{CompatGeckoMobile("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
username and password{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("26")}} [2]{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}
origin {{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("26")}} [2]{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -

[1] Though not grouped in a single abstract interface, these methods are directly available on the interfaces that implement it, if this interface is supported.

- -

[2] This mixin was called URLUtils before Firefox 45, and was also implemented to other by other interfaces, like {{domxref("Location")}}. From Firefox 45, the other interfaces implements their own version of the properties and methods they need.

- -

See also

- - - -
-
 
-
diff --git a/files/ru/web/api/htmlhyperlinkelementutils/origin/index.html b/files/ru/web/api/htmlhyperlinkelementutils/origin/index.html deleted file mode 100644 index b0e6b46e2e..0000000000 --- a/files/ru/web/api/htmlhyperlinkelementutils/origin/index.html +++ /dev/null @@ -1,116 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.origin -slug: Web/API/HTMLHyperlinkElementUtils/origin -tags: - - API - - Experimental - - HTMLHyperlinkElementUtils - - Property - - Read-only - - Reference - - URL API -translation_of: Web/API/HTMLHyperlinkElementUtils/origin ---- -

{{APIRef("URL API")}}

- -

Свойство только для чтения HTMLHyperlinkElementUtils.origin это {{domxref("USVString")}}, содержащий сериализованные в Unicode протокол, хост и порт, а именно:

- - - -

{{AvailableInWorkers}}

- -

Синтаксис

- -
string = object.origin;
-
- -

Примеры

- -
// На этой странице
-var result = window.location.origin; // Вернет: 'https://developer.mozilla.org'
-
- -

Спецификации

- - - - - - - - - - - - - - -
СпецификацияСтатусКомментарий
{{SpecName('HTML WHATWG', '#dom-hyperlink-origin', 'HTMLHyperlinkElementUtils.origin')}}{{Spec2('HTML WHATWG')}}Изначальное определение.
- -

Совместимость с браузерами

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - -
ВозможностьChromeFirefox (Gecko)Internet ExplorerOperaSafari
Базовая поддержка{{CompatVersionUnknown()}}{{CompatGeckoDesktop("26.0")}} [2][3]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
-
- -
- - - - - - - - - - - - - - - - - - - - - -
ВозможностьAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базовая поддержка{{CompatNo}} [1]{{CompatNo}} [1]{{CompatGeckoMobile("26.0")}} [2][3]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
-
- -

[1] Хотя оно и не включено в один абстрактный интерфейс, это свойство напрямую доступно в интерфейсах, которые его реализуют.

- -

[2] С Gecko 26 по Gecko 44, это свойство находилось в URLUtils. Оно было перемещено или в HTMLHyperlinkElementUtils, или напрямую в интерфейс.

- -

[3] До Gecko 49, для URL, начинающихся с blob, ошибочно возвращался null.

- -

Смотрите также

- - diff --git a/files/ru/web/api/htmlhyperlinkelementutils/password/index.html b/files/ru/web/api/htmlhyperlinkelementutils/password/index.html deleted file mode 100644 index 668749a367..0000000000 --- a/files/ru/web/api/htmlhyperlinkelementutils/password/index.html +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.password -slug: Web/API/HTMLHyperlinkElementUtils/password -tags: - - API - - Experimental - - HTMLHyperlinkElementUtils - - Property - - URL API -translation_of: Web/API/HTMLHyperlinkElementUtils/password ---- -

{{ApiRef("URL API")}}

- -

Свойство HTMLHyperlinkElementUtils.password это {{domxref("USVString")}}, содержащий пароль, указанный перед именем домена.

- -

password игнорируется без предупреждения, если свойство username не установлено.

- -

Синтаксис

- -
string = object.password;
-object.password = string;
-
- -

Примеры

- -
// Допустим, что документ содержит элемент <a id="myAnchor" href="https://anonymous:flabada@developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.username">
-var anchor = document.getElementByID("myAnchor");
-var result = anchor.password; // Вернет: 'flabada'
-
- -

Спецификации

- - - - - - - - - - - - - - -
СпецификацияСтатусКомментарий
{{SpecName('HTML WHATWG', '#dom-hyperlink-prassword', 'HTMLHyperlinkElementUtils.password')}}{{Spec2('HTML WHATWG')}}Изначальное определение.
- -

Совместимость с браузерами

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - -
ВозможностьChromeFirefox (Gecko)Internet ExplorerOperaSafari
Базовая поддержка{{CompatNo}}{{CompatGeckoDesktop("26")}} [1]{{CompatNo}}{{CompatNo}}{{CompatNo}}
-
- -
- - - - - - - - - - - - - - - - - - - - - -
ВозможностьAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базовая поддержка{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("26")}} [1]{{CompatNo}}{{CompatNo}}{{CompatNo}}
-
- -

[1] С Gecko 26 по Gecko 44, это свойство находилось в URLUtils. Оно было перемещено или в HTMLHyperlinkElementUtils, или напрямую в интерфейс.

- -

Смотрите также

- - diff --git a/files/ru/web/api/htmlhyperlinkelementutils/pathname/index.html b/files/ru/web/api/htmlhyperlinkelementutils/pathname/index.html deleted file mode 100644 index 9f6fb68608..0000000000 --- a/files/ru/web/api/htmlhyperlinkelementutils/pathname/index.html +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.pathname -slug: Web/API/HTMLHyperlinkElementUtils/pathname -tags: - - API - - Experimental - - HTMLHyperlinkElementUtils - - Property - - URL API -translation_of: Web/API/HTMLHyperlinkElementUtils/pathname ---- -

{{ApiRef("URL API")}}

- -

Свойство HTMLHyperlinkElementUtils.pathname это {{domxref("USVString")}}, содержащий первый '/' после хоста с последующим текстом URL.

- -

Синтаксис

- -
string = object.pathname;
-object.pathname = string;
-
- -

Примеры

- -
// Допустим, что документ содержит элемент <a id="myAnchor" href="https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.pathname">
-var anchor = document.getElementById("myAnchor");
-var result = anchor.pathname; // Вернет: '/en-US/docs/HTMLHyperlinkElementUtils.pathname'
-
- -

Спецификации

- - - - - - - - - - - - - - -
СпецификацияСтатусКомментарий
{{SpecName('HTML WHATWG', '#dom-hyperlink-pathname', 'HTMLHyperlinkElementUtils.pathname')}}{{Spec2('HTML WHATWG')}}Изначальное определение.
- -

Совместимость с браузерами

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - -
ВозможностьChromeFirefox (Gecko)Internet ExplorerOperaSafari
Базовая поддержка{{CompatNo}} [1]{{CompatGeckoDesktop("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
-
- -
- - - - - - - - - - - - - - - - - - - - - -
ВозможностьAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базовая поддержка{{CompatNo}} [1]{{CompatNo}} [1]{{CompatGeckoMobile("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
-
- -

[1] Хотя оно и не включено в один абстрактный интерфейс, это свойство напрямую доступно в интерфейсах, которые его реализуют.

- -

[2] С Gecko 22 по Gecko 44, это свойство находилось в URLUtils. Оно было перемещено или в HTMLHyperlinkElementUtils, или напрямую в интерфейс.

- -

Смотрите также

- - diff --git a/files/ru/web/api/htmlhyperlinkelementutils/port/index.html b/files/ru/web/api/htmlhyperlinkelementutils/port/index.html deleted file mode 100644 index 2ab4461fc4..0000000000 --- a/files/ru/web/api/htmlhyperlinkelementutils/port/index.html +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.port -slug: Web/API/HTMLHyperlinkElementUtils/port -tags: - - API - - Experimental - - HTMLHyperlinkElementUtils - - Property - - URL API -translation_of: Web/API/HTMLHyperlinkElementUtils/port ---- -

{{ApiRef("URL API")}}

- -

Свойство HTMLHyperlinkElementUtils.port это {{domxref("USVString")}}, содержащий номер порта.

- -

При значении '' будет использоваться порт по умолчанию для указанного протокола (не 0).

- -

Синтаксис

- -
string = object.port;
-object.port = string;
-
- -

Примеры

- -
// Допустим, что документ содержит элемент <a id="myAnchor" href="https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.port">
-var anchor = document.getElementByID("myAnchor");
-var result = anchor.port; // Вернет: '80'
-
- -

Спецификации

- - - - - - - - - - - - - - -
СпецификацияСтатусКомментарий
{{SpecName('HTML WHATWG', '#dom-hyperlink-port', 'HTMLHyperlinkElementUtils.port')}}{{Spec2('HTML WHATWG')}}Изначальное определение.
- -

Совместимость с браузерами

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - -
ВозможностьChromeFirefox (Gecko)Internet ExplorerOperaSafari
Базовая поддержка{{CompatNo}} [1]{{CompatGeckoDesktop("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
-
- -
- - - - - - - - - - - - - - - - - - - - - -
ВозможностьAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базовая поддержка{{CompatNo}} [1]{{CompatNo}} [1]{{CompatGeckoMobile("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
-
- -

[1] Хотя оно и не включено в один абстрактный интерфейс, это свойство напрямую доступно в интерфейсах, которые его реализуют.

- -

[2] С Gecko 22 по Gecko 44, это свойство находилось в URLUtils. Оно было перемещено или в HTMLHyperlinkElementUtils, или напрямую в интерфейс.

- -

Смотрите также

- - diff --git a/files/ru/web/api/htmlhyperlinkelementutils/protocol/index.html b/files/ru/web/api/htmlhyperlinkelementutils/protocol/index.html deleted file mode 100644 index d7b3b4327f..0000000000 --- a/files/ru/web/api/htmlhyperlinkelementutils/protocol/index.html +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.protocol -slug: Web/API/HTMLHyperlinkElementUtils/protocol -tags: - - API - - Experimental - - HTMLHyperlinkElementUtils - - Property - - URL API -translation_of: Web/API/HTMLHyperlinkElementUtils/protocol ---- -

{{ApiRef("URL API")}}

- -

Свойство HTMLHyperlinkElementUtils.protocol это {{domxref("USVString")}}, содержащий протокол URL включая ':' в конце.

- -

Синтаксис

- -
string = object.protocol;
-object.protocol = string;
-
- -

Примеры

- -
// Допустим, что документ содержит элемент <a id="myAnchor" href="https://developer.mozilla.org/en-US/HTMLHyperlinkElementUtils.protocol">
-var anchor = document.getElementByID("myAnchor");
-var result = anchor.protocol; // Вернет: 'https:'
-
- -

Спецификации

- - - - - - - - - - - - - - -
СпецификацияСтатусКомментарий
{{SpecName('HTML WHATWG', '#dom-hyperlink-protocol', 'HTMLHyperlinkElementUtils.protocol')}}{{Spec2('HTML WHATWG')}}Изначальное определение.
- -

Совместимость с браузерами

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - -
ВозможностьChromeFirefox (Gecko)Internet ExplorerOperaSafari
Базовая поддержка{{CompatNo}} [1]{{CompatGeckoDesktop("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
-
- -
- - - - - - - - - - - - - - - - - - - - - -
ВозможностьAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базовая поддержка{{CompatNo}} [1]{{CompatNo}} [1]{{CompatGeckoMobile("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
-
- -

[1] Хотя оно и не включено в один абстрактный интерфейс, это свойство напрямую доступно в интерфейсах, которые его реализуют.

- -

[2] С Gecko 22 по Gecko 44, это свойство находилось в URLUtils. Оно было перемещено или в HTMLHyperlinkElementUtils, или напрямую в интерфейс.

- -

Смотрите также

- - diff --git a/files/ru/web/api/htmlhyperlinkelementutils/search/index.html b/files/ru/web/api/htmlhyperlinkelementutils/search/index.html deleted file mode 100644 index 7c23ed4fc8..0000000000 --- a/files/ru/web/api/htmlhyperlinkelementutils/search/index.html +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.search -slug: Web/API/HTMLHyperlinkElementUtils/search -tags: - - API - - Experimental - - HTMLHyperlinkElementUtils - - Property - - URL API -translation_of: Web/API/HTMLHyperlinkElementUtils/search ---- -

{{ApiRef("URL API")}}

- -

Свойство HTMLHyperlinkElementUtils.search это {{domxref("USVString")}}, содержащий '?' с последующими параметрами URL.

- -

Синтаксис

- -
string = object.search;
-object.search = string;
-
- -

Примеры

- -
// Допустим, что документ содержит элемент <a id="myAnchor" href="https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.search?q=123">
-var anchor = document.getElementById("myAnchor");
-var result = anchor.search; // Вернет: '?q=123'
-
- -

Спецификации

- - - - - - - - - - - - - - -
СпецификацияСтатусКомментарий
{{SpecName('HTML WHATWG', '#dom-hyperlink-search', 'HTMLHyperlinkElementUtils.search')}}{{Spec2('HTML WHATWG')}}Изначальное определение.
- -

Совместимость с браузерами

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - -
ВозможностьChromeFirefox (Gecko)Internet ExplorerOperaSafari
Базовая поддержка{{CompatVersionUnknown}} [1]{{CompatGeckoDesktop("22")}} [2]{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}} [1]
-
- -
- - - - - - - - - - - - - - - - - - - - - -
ВозможностьAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базовая поддержка{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}} [1]{{CompatGeckoMobile("22")}} [2]{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}} [1]
-
- -

[1] Хотя оно и не включено в один абстрактный интерфейс, это свойство напрямую доступно в интерфейсах, которые его реализуют.

- -

[2] С Gecko 22 по Gecko 44, это свойство находилось в URLUtils. Оно было перемещено или в HTMLHyperlinkElementUtils, или напрямую в интерфейс.

- -

Смотрите также

- - diff --git a/files/ru/web/api/htmlhyperlinkelementutils/tostring/index.html b/files/ru/web/api/htmlhyperlinkelementutils/tostring/index.html deleted file mode 100644 index aa8d9362c0..0000000000 --- a/files/ru/web/api/htmlhyperlinkelementutils/tostring/index.html +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.toString() -slug: Web/API/HTMLHyperlinkElementUtils/toString -tags: - - API - - Experimental - - HTMLHyperlinkElementUtils - - Location - - Method - - Stringifier - - URL API -translation_of: Web/API/HTMLHyperlinkElementUtils/toString ---- -

{{ApiRef("URL API")}}

- -

Метод HTMLHyperlinkElementUtils.toString() возвращает {{domxref("USVString")}}, содержащий URL целиком. Это версия {{domxref("HTMLHyperlinkElementUtils.href")}} только для чтения.

- -

Синтаксис

- -
string = object.toString();
- -

Примеры

- -
// Допустим, что документ содержит элемент <a id="myAnchor" href="https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils/toString">
-var anchor = document.getElementById("myAnchor");
-var result = anchor.toString(); // Вернет: 'https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils/toString'
-
- -

Спецификации

- - - - - - - - - - - - - - -
СпецификацияСтатусКомментарий
{{SpecName('HTML WHATWG', '#htmlhyperlinkelementutils', 'HTMLHyperlinkElementUtils.toString()')}}{{Spec2('HTML WHATWG')}}Изначальное определение.
- -

Совместимость с браузерами

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - -
ВозможностьChromeFirefox (Gecko)Internet ExplorerOperaSafari
Базовая поддержка{{CompatNo}} [1]{{CompatGeckoDesktop("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
-
- -
- - - - - - - - - - - - - - - - - - - - - -
ВозможностьAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базовая поддержка{{CompatNo}} [1]{{CompatNo}} [1]{{CompatGeckoMobile("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
-
- -

[1] Хотя оно и не включено в один абстрактный интерфейс, это свойство напрямую доступно в интерфейсах, которые его реализуют.

- -

[2] С Gecko 22 по Gecko 44, это свойство находилось в URLUtils. Оно было перемещено или в HTMLHyperlinkElementUtils, или напрямую в интерфейс.

- -

Смотрите также

- - diff --git a/files/ru/web/api/htmlhyperlinkelementutils/username/index.html b/files/ru/web/api/htmlhyperlinkelementutils/username/index.html deleted file mode 100644 index c4da9f8b58..0000000000 --- a/files/ru/web/api/htmlhyperlinkelementutils/username/index.html +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.username -slug: Web/API/HTMLHyperlinkElementUtils/username -tags: - - API - - Experimental - - HTMLHyperlinkElementUtils - - Property - - URL API -translation_of: Web/API/HTMLHyperlinkElementUtils/username ---- -

{{ApiRef("URL API")}}

- -

Свойство HTMLHyperlinkElementUtils.username это {{domxref("USVString")}}, содержащий имя пользователя, указанное перед именем домена.

- -

Синтаксис

- -
string = object.username;
-object.username = string;
-
- -

Примеры

- -
// Допустим, что документ содержит элемент <a id="myAnchor" href="https://anonymous:flabada@developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.username">
-var anchor = document.getElementByID("myAnchor");
-var result = anchor.username; // Вернет: 'anonymous'
-
- -

Спецификации

- - - - - - - - - - - - - - -
СпецификацияСтатусКомментарий
{{SpecName('HTML WHATWG', '#dom-hyperlink-username', 'HTMLHyperlinkElementUtils.username')}}{{Spec2('HTML WHATWG')}}Изначальное определение.
- -

Совместимость с браузерами

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - -
ВозможностьChromeFirefox (Gecko)Internet ExplorerOperaSafari
Базовая поддержка{{CompatNo}}{{CompatGeckoDesktop("26")}} [1]{{CompatNo}}{{CompatNo}}{{CompatNo}}
-
- -
- - - - - - - - - - - - - - - - - - - - - -
ВозможностьAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базовая поддержка{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("26")}} [1]{{CompatNo}}{{CompatNo}}{{CompatNo}}
-
- -

[1] С Gecko 26 по Gecko 44, это свойство находилось в URLUtils. Оно было перемещено или в HTMLHyperlinkElementUtils, или напрямую в интерфейс.

- -

Смотрите также

- - diff --git a/files/ru/web/api/nondocumenttypechildnode/index.html b/files/ru/web/api/nondocumenttypechildnode/index.html deleted file mode 100644 index 20f5c6ea40..0000000000 --- a/files/ru/web/api/nondocumenttypechildnode/index.html +++ /dev/null @@ -1,132 +0,0 @@ ---- -title: NonDocumentTypeChildNode -slug: Web/API/NonDocumentTypeChildNode -tags: - - API - - DOM - - Interface - - NeedsTranslation - - Reference - - TopicStub -translation_of: Web/API/NonDocumentTypeChildNode ---- -
{{APIRef("DOM")}}
- -

The NonDocumentTypeChildNode interface contains methods that are particular to {{domxref("Node")}} objects that can have a parent, but not suitable for {{domxref("DocumentType")}}.

- -

NonDocumentTypeChildNode is a raw interface and no object of this type can be created; it is implemented by {{domxref("Element")}}, and {{domxref("CharacterData")}} objects.

- -

Properties

- -

There is no inherited property.

- -
-
{{domxref("NonDocumentTypeChildNode.previousElementSibling")}} {{readonlyInline}}
-
Returns the {{domxref("Element")}} immediately prior to this node in its parent's children list, or null if there is no {{domxref("Element")}} in the list prior to this node.
-
{{domxref("NonDocumentTypeChildNode.nextElementSibling")}} {{readonlyInline}}
-
Returns the {{domxref("Element")}} immediately following this node in its parent's children list, or null if there is no {{domxref("Element")}} in the list following this node.
-
- -

Methods

- -

There is neither inherited, nor specific method.

- -

Specifications

- - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('DOM WHATWG', '#interface-childnode', 'NonDocumentTypeChildNode')}}{{Spec2('DOM WHATWG')}}Splitted the ElementTraversal interface in {{domxref("ParentNode")}}, {{domxref("ChildNode")}}, and NonDocumentTypeChildNode. The previousElementSibling and nextElementSibling are now defined on the latter.
- The {{domxref("CharacterData")}} and {{domxref("Element")}} implemented the new interfaces.
{{SpecName('Element Traversal', '#interface-elementTraversal', 'ElementTraversal')}}{{Spec2('Element Traversal')}}Added the initial definition of its properties to the ElementTraversal pure interface and use it on {{domxref("Element")}}.
- -

Browser compatibility

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support (on {{domxref("Element")}})1.0{{CompatGeckoDesktop("1.9.1")}}9.010.04.0
Support (on {{domxref("CharacterData")}})1.0{{CompatGeckoDesktop("25.0")}} [1]9.010.04.0
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support (on {{domxref("Element")}}){{ CompatVersionUnknown() }}{{CompatGeckoDesktop("1.9.1")}}{{ CompatVersionUnknown() }}10.0{{ CompatVersionUnknown() }}
Support (on {{domxref("CharacterData")}}){{ CompatVersionUnknown() }}{{CompatGeckoDesktop("25.0")}}{{ CompatVersionUnknown() }}10.0{{ CompatVersionUnknown() }}
-
- -

[1] Firefox 25 also added the two properties defined here on {{domxref("DocumentType")}}, this was removed in Firefox 28 due to compatibility problems, and led to the creation of this new pure interface.

- -

See also

- - diff --git a/files/ru/web/api/nondocumenttypechildnode/nextelementsibling/index.html b/files/ru/web/api/nondocumenttypechildnode/nextelementsibling/index.html deleted file mode 100644 index 1e8d05c4c2..0000000000 --- a/files/ru/web/api/nondocumenttypechildnode/nextelementsibling/index.html +++ /dev/null @@ -1,174 +0,0 @@ ---- -title: NonDocumentTypeChildNode.nextElementSibling -slug: Web/API/NonDocumentTypeChildNode/nextElementSibling -translation_of: Web/API/NonDocumentTypeChildNode/nextElementSibling -original_slug: Web/API/NonDocumentTypeChildNode/NonDocumentTypeChildNode.nextElementSibling ---- -
{{APIRef("DOM")}}
- -

NonDocumentTypeChildNode.nextElementSibling свойство только для чтения, возвращающее последующий элемент перед текущим, или null, если элемент является последним в своём родительском узле.

- -

Синтаксис

- -
var nextNode = elementNodeReference.nextElementSibling; 
- -

Пример

- -
<div id="div-01">Это div-01</div>
-<div id="div-02">Это div-02</div>
-
-<script type="text/javascript">
-  var el = document.getElementById('div-01').nextElementSibling;
-  console.log('Сосед div-01:');
-  while (el) {
-    console.log(el.nodeName);
-    el = el.nextElementSibling;
-  }
-</script>
-
- -

Этот пример выведет в консоль следующее:

- -
Сосед div-01:
-DIV
-SCRIPT
- -

Полифилл для IE8

- -

Данное свойство не пожддерживается до IE9. Используйте следующий полифилл, чтобы обойти этот недостаток:

- -
// Источник: https://github.com/Alhadis/Snippets/blob/master/js/polyfills/IE8-child-elements.js
-if (!('nextElementSibling' in document.documentElement)) {
-    Object.defineProperty(Element.prototype, 'nextElementSibling', {
-        get: function() {
-            var e = this.nextSibling;
-            while (e && 1 !== e.nodeType) {
-                e = e.nextSibling;
-            }
-            return e;
-        }
-    });
-}
- -

Полифилл для IE9+ и Safari

- -
// Источник: https://github.com/jserz/js_piece/blob/master/DOM/NonDocumentTypeChildNode/nextElementSibling/nextElementSibling.md
-(function(arr) {
-    arr.forEach(function(item) {
-        if (item.hasOwnProperty('nextElementSibling')) {
-            return;
-        }
-        Object.defineProperty(item, 'nextElementSibling', {
-            configurable: true,
-            enumerable: true,
-            get: function() {
-                var el = this;
-                while (el = el.nextSibling) {
-                    if (el.nodeType === 1) {
-                        return el;
-                    }
-                }
-                return null;
-            },
-            set: undefined
-        });
-    });
-})([Element.prototype, CharacterData.prototype]);
- -

Спецификации

- - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('DOM WHATWG', '#dom-nondocumenttypechildnode-nextelementsibling', 'ChildNodenextElementSibling')}}{{Spec2('DOM WHATWG')}}Split the ElementTraversal interface in {{domxref("ChildNode")}}, {{domxref("ParentNode")}}, and {{domxref("NonDocumentTypeChildNode")}}. This method is now defined on the former.
- The {{domxref("Element")}} and {{domxref("CharacterData")}} interfaces implemented the new interface.
{{SpecName('Element Traversal', '#attribute-nextElementSibling', 'ElementTraversal.nextElementSibling')}}{{Spec2('Element Traversal')}}Added its initial definition to the ElementTraversal pure interface and use it on {{domxref("Element")}}.
- -

Совместимость с браузерами

- -
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
БраузерыChromeFirefox (Gecko)Internet ExplorerOperaSafari
Базовая поддержка ({{domxref("Element")}})4{{CompatGeckoDesktop("1.9.1")}}99.84
Поддержка {{domxref("CharacterData")}}29.0{{CompatGeckoDesktop("25")}} [1]{{CompatNo}}16.0{{CompatNo}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
БраузерыAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базовая поддержка ( {{domxref("Element")}}){{CompatVersionUnknown}}{{CompatGeckoMobile("1.9.1")}}{{CompatVersionUnknown}}9.8{{CompatVersionUnknown}}
Поддержка {{domxref("CharacterData")}}{{CompatVersionUnknown}}{{CompatGeckoMobile("25")}}{{CompatNo}}16.0{{CompatNo}}
-
- -

[1] Firefox 25 также добавил это свойство в {{domxref("DocumentType")}}, но оно было удалено в Firefox 28, из-за проблем совместимости.

- -

См. также

- - diff --git a/files/ru/web/api/nondocumenttypechildnode/previouselementsibling/index.html b/files/ru/web/api/nondocumenttypechildnode/previouselementsibling/index.html deleted file mode 100644 index 2cc659ef51..0000000000 --- a/files/ru/web/api/nondocumenttypechildnode/previouselementsibling/index.html +++ /dev/null @@ -1,185 +0,0 @@ ---- -title: NonDocumentTypeChildNode.previousElementSibling -slug: Web/API/NonDocumentTypeChildNode/previousElementSibling -translation_of: Web/API/NonDocumentTypeChildNode/previousElementSibling ---- -
-
{{APIRef("DOM")}}
-
- -

Свойство NonDocumentTypeChildNode.previousElementSibling только для чтения возвращает  {{domxref("Element")}} элемент стоящий перед применяемым, из списка дочерних элементов родителя или возвращает null, если таковых не имеется.

- -

Синтаксис

- -
prevNode = elementNodeReference.previousElementSibling;
-
- -

Примеры

- -
<div id="div-01">Here is div-01</div>
-<div id="div-02">Here is div-02</div>
-<li>This is a list item</li>
-<li>This is another list item</li>
-<div id="div-03">Here is div-03</div>
-
-<script>
-  var el = document.getElementById('div-03').previousElementSibling;
-  document.write('<p>Siblings of div-03</p><ol>');
-  while (el) {
-    document.write('<li>' + el.nodeName + '</li>');
-    el = el.previousElementSibling;
-  }
-  document.write('</ol>');
-</script>
-
- -

Этот пример выводит следующие элементы на страницу при загрузке:

- -
Соседи div-03
-
-   1. LI
-   2. LI
-   3. DIV
-   4. DIV
-
- -

Полифилл для Internet Explorer 8

- -

Это свойство поддерживается начиная с версии IE9, поэтому следующий фрагмент поддерживается, и может использоваться для IE8:

- -
// Ресурс: https://github.com/Alhadis/Snippets/blob/master/js/polyfills/IE8-child-elements.js
-if(!("previousElementSibling" in document.documentElement)){
-    Object.defineProperty(Element.prototype, "previousElementSibling", {
-        get: function(){
-            var e = this.previousSibling;
-            while(e && 1 !== e.nodeType)
-                e = e.previousSibling;
-            return e;
-        }
-    });
-}
- -

Полифилл для  Internet Explorer 9+ и Safari

- -
// Ресурс: https://github.com/jserz/js_piece/blob/master/DOM/NonDocumentTypeChildNode/previousElementSibling/previousElementSibling.md
-(function (arr) {
-  arr.forEach(function (item) {
-    if (item.hasOwnProperty('previousElementSibling')) {
-      return;
-    }
-    Object.defineProperty(item, 'previousElementSibling', {
-      configurable: true,
-      enumerable: true,
-      get: function () {
-        var el = this;
-        while (el = el.previousSibling) {
-          if (el.nodeType === 1) {
-            return el;
-          }
-        }
-        return null;
-      },
-      set: undefined
-    });
-  });
-})([Element.prototype, CharacterData.prototype]);
- -

Спецификация

- - - - - - - - - - - - - - - - - - - -
СпецификацияСтатусКомментарии
{{SpecName('DOM WHATWG', '#dom-nondocumenttypechildnode-previouselementsibling', 'NonDocumentTypeChildNode.previousElementSibling')}}{{Spec2('DOM WHATWG')}}Splitted the ElementTraversal interface in {{domxref("ChildNode")}}, {{domxref("ParentNode")}}, and {{domxref("NonDocumentTypeChildNode")}}. This method is now defined on the former.
- The {{domxref("Element")}} and {{domxref("CharacterData")}} interfaces implemented the new interface.
{{SpecName('Element Traversal', '#attribute-previousElementSibling', 'ElementTraversal.previousElementSibling')}}{{Spec2('Element Traversal')}}Added its initial definition to the ElementTraversal pure interface and use it on {{domxref("Element")}}.
- -

Поддержка браузерами

- -
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
ФункционалChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support (on {{domxref("Element")}})4{{CompatGeckoDesktop("1.9.1")}}99.84
Support on {{domxref("CharacterData")}}29.0{{CompatGeckoDesktop("25")}} [1]{{CompatNo}}16.0{{CompatNo}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
ФункционалAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support (on {{domxref("Element")}}){{CompatVersionUnknown}}{{CompatGeckoMobile("1.9.1")}}{{CompatVersionUnknown}}9.8{{CompatVersionUnknown}}
Support on {{domxref("CharacterData")}}{{CompatVersionUnknown}}{{CompatGeckoMobile("25")}}{{CompatNo}}16.0{{CompatNo}}
-
- -

[1] Firefox 25 так же добавлено это свойство {{domxref("DocumentType")}}, но было удалено в Firefox 28 из-за проблем с совместимостью.

- -

Смотрите так же

- - diff --git a/files/zh-cn/conflicting/web/api/element_861159909c20acebf8e506c3bb0e2f7e/index.html b/files/zh-cn/conflicting/web/api/element_861159909c20acebf8e506c3bb0e2f7e/index.html new file mode 100644 index 0000000000..bdaccbe5fd --- /dev/null +++ b/files/zh-cn/conflicting/web/api/element_861159909c20acebf8e506c3bb0e2f7e/index.html @@ -0,0 +1,69 @@ +--- +title: NonDocumentTypeChildNode +slug: Web/API/NonDocumentTypeChildNode +tags: + - API + - DOM + - NonDocumentTypeChildNode + - 参考 + - 接口 +translation_of: Web/API/NonDocumentTypeChildNode +--- +
{{APIRef("DOM")}}
+ +

NonDocumentTypeChildNode 接口包含专属于某些(特殊) {{domxref("Node")}} 对象的方法,这些对象可以拥有父对象,但不适用于 {{domxref("DocumentType")}} 接口。

+ +

NonDocumentTypeChildNode 是一个裸接口(raw interface),无法创建拥有此类型的对象;它是由 {{domxref("Element")}},和 {{domxref("CharacterData")}} 对象实现的。

+ +

属性

+ +

此接口没有继承属性。

+ +
+
{{domxref("NonDocumentTypeChildNode.previousElementSibling")}} {{readonlyInline}}
+
Returns the {{domxref("Element")}} immediately prior to this node in its parent's children list, or null if there is no {{domxref("Element")}} in the list prior to this node.
+
{{domxref("NonDocumentTypeChildNode.nextElementSibling")}} {{readonlyInline}}
+
Returns the {{domxref("Element")}} immediately following this node in its parent's children list, or null if there is no {{domxref("Element")}} in the list following this node.
+
+ +

方法

+ +

此接口既没有继承方法,又没有专有方法。

+ +

规范

+ + + + + + + + + + + + + + + + + + + +
规范状态备注
{{SpecName('DOM WHATWG', '#interface-childnode', 'NonDocumentTypeChildNode')}}{{Spec2('DOM WHATWG')}}Splitted the ElementTraversal interface in {{domxref("ParentNode")}}, {{domxref("ChildNode")}}, and NonDocumentTypeChildNode. The previousElementSibling and nextElementSibling are now defined on the latter.
+ The {{domxref("CharacterData")}} and {{domxref("Element")}} implemented the new interfaces.
{{SpecName('Element Traversal', '#interface-elementTraversal', 'ElementTraversal')}}{{Spec2('Element Traversal')}}Added the initial definition of its properties to the ElementTraversal pure interface and use it on {{domxref("Element")}}.
+ +

浏览器兼容性

+ + + +

{{Compat("api.NonDocumentTypeChildNode")}}

+ +

参见

+ + diff --git a/files/zh-cn/orphaned/web/api/htmlhyperlinkelementutils/index.html b/files/zh-cn/orphaned/web/api/htmlhyperlinkelementutils/index.html new file mode 100644 index 0000000000..d6d93674e3 --- /dev/null +++ b/files/zh-cn/orphaned/web/api/htmlhyperlinkelementutils/index.html @@ -0,0 +1,84 @@ +--- +title: URLUtils +slug: Web/API/HTMLHyperlinkElementUtils +translation_of: Web/API/HTMLHyperlinkElementUtils +original_slug: Web/API/URLUtils +--- +

{{ApiRef("URL API")}}{{SeeCompatTable}}

+ +

The HTMLHyperlinkElementUtils mixin defines utility methods and properties to work with {{domxref("HTMLAnchorElement")}} and {{domxref("HTMLAreaElement")}}. These utilities allow to deal with common features like URLs.

+ +

There are no objects of this type, but several objects {{domxref("HTMLAnchorElement")}} and {{domxref("HTMLAreaElement")}} implement it.

+ +

属性

+ +
+

注意:This interface doesn't inherit any property.

+
+ +
+
{{domxref("HTMLHyperlinkElementUtils.href")}}
+
This is a {{domxref("USVString")}} containing the whole URL.
+
{{domxref("HTMLHyperlinkElementUtils.protocol")}}
+
This is a {{domxref("USVString")}} containing the protocol scheme of the URL, including the final ':'.
+
{{domxref("HTMLHyperlinkElementUtils.host")}}
+
This is a {{domxref("USVString")}} containing the host, that is the hostname, and then, if the port of the URL is not empty (which can happen because it was not specified or because it was specified to be the default port of the URL's scheme), a ':', and the port of the URL.
+
{{domxref("HTMLHyperlinkElementUtils.hostname")}}
+
This is a {{domxref("USVString")}} containing the domain of the URL.
+
{{domxref("HTMLHyperlinkElementUtils.port")}}
+
This is a {{domxref("USVString")}} containing the port number of the URL.
+
{{domxref("HTMLHyperlinkElementUtils.pathname")}}
+
This is a {{domxref("USVString")}} containing an initial '/' followed by the path of the URL.
+
{{domxref("HTMLHyperlinkElementUtils.search")}}
+
This is a {{domxref("USVString")}} containing a '?' followed by the parameters of the URL.
+
{{domxref("HTMLHyperlinkElementUtils.hash")}}
+
This is a {{domxref("USVString")}} containing a '#' followed by the fragment identifier of the URL.
+
{{domxref("HTMLHyperlinkElementUtils.username")}}
+
This is a {{domxref("USVString")}} containing the username specified before the domain name.
+
{{domxref("HTMLHyperlinkElementUtils.password")}}
+
This is a {{domxref("USVString")}} containing the password specified before the domain name.
+
{{domxref("HTMLHyperlinkElementUtils.origin")}} {{readonlyInline}}
+
This returns a {{domxref("USVString")}} containing the origin of the URL (that is its scheme, its domain and its port).
+
+ +

方法

+ +
+

注意:This interface doesn't inherit any method.

+
+ +
+
{{domxref("HTMLHyperlinkElementUtils.toString()")}}
+
This returns a {{domxref("USVString")}} containing the whole URL. It is a synonym for {{domxref("HTMLHyperlinkElementUtils.href")}}, though it can't be used to modify the value.
+
+ +

规范

+ + + + + + + + + + + + + + + + +
规范状态备注
{{SpecName('HTML WHATWG', '#htmlhyperlinkelementutils', 'HTMLHyperlinkElementUtils')}}{{Spec2('HTML WHATWG')}}Initial definition
+ +

浏览器兼容性

+ + + +

{{Compat("api.HTMLHyperlinkElementUtils")}}

+ +

参见

+ + diff --git a/files/zh-cn/web/api/document/activeelement/index.html b/files/zh-cn/web/api/document/activeelement/index.html new file mode 100644 index 0000000000..90b67fbf5c --- /dev/null +++ b/files/zh-cn/web/api/document/activeelement/index.html @@ -0,0 +1,86 @@ +--- +title: DocumentOrShadowRoot.activeElement +slug: Web/API/DocumentOrShadowRoot/activeElement +translation_of: Web/API/DocumentOrShadowRoot/activeElement +--- +
{{APIRef("Shadow DOM")}}
+ +

{{domxref("Document")}} 和 {{domxref("ShadowRoot")}} 接口的 activeElement 只读属性,用来返回当前在DOM或者shadow DOM树中处于聚焦状态的{{domxref("Element")}}。

+ +

通常情况下,如果 {{domxref("HTMLInputElement")}} 或者 {{domxref("HTMLTextAreaElement")}}元素中有文字被选中时, activeElement属性就会返回该元素 。这时,你可以调用该元素的{{domxref("Document.selectionStart", "selectionStart")}} 和 {{domxref("Document.selectionEnd", "selectionEnd")}} 属性获取更多选中文字的信息. 其他情况下,焦点元素也可能是{{HTMLElement("select")}}元素 (menu) 或者一个别的 {{HTMLElement("input")}} 元素, 比如 "button", "checkbox", 或者 "radio".

+ +

通常用户可以使用tab键来切换页面中的焦点元素获得焦点, 使用空格键使元素active (比如按下一个按钮或者 切换一个 radio). 具体哪些元素可以获得焦点与系统和浏览器的设置有关。比如, 在 macOS 系统上, 不是text input元素默认情况下是不能获得焦点的。

+ +
+

Note: Focus (可收到input事件的元素) 和 selection (目前页面被高亮的部分)不是一回事. 你可以通过 {{domxref("window.getSelection()")}}获取当前用户选择的文本.

+
+ +

Syntax

+ +
element = DocumentOrShadowRoot.activeElement
+ +

Value

+ +

当前获得焦点的 {{domxref('Element')}} ,如果没有焦点元素,会返回 {{HTMLElement("body")}} 或者 null 。

+ +

Example

+ +

HTML

+ +
<p>Select some text from one of the text areas below:</p>
+
+<form>
+  <textarea name="ta-example-one" id="ta-example-one" rows="7" cols="40">This is Text Area One. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec tincidunt, lorem a porttitor molestie, odio nibh iaculis libero, et accumsan nunc orci eu dui.</textarea>
+  <textarea name="ta-example-two" id="ta-example-two" rows="7" cols="40">This is Text Area Two. Fusce ullamcorper, nisl ac porttitor adipiscing, urna orci egestas libero, ut accumsan orci lacus laoreet diam. Morbi sed euismod diam.</textarea>
+</form>
+
+<p>Active element ID: <b id="output-element"></b></p>
+<p>Selected text: <b id="output-text"></b></p>
+ +

JavaScript

+ +
function onMouseUp(e) {
+  const activeTextarea = document.activeElement;
+  const selection = activeTextarea.value.substring(
+    activeTextarea.selectionStart, activeTextarea.selectionEnd
+  );
+
+  const outputElement = document.getElementById('output-element');
+  const outputText = document.getElementById('output-text');
+  outputElement.innerHTML = activeTextarea.id;
+  outputText.innerHTML = selection;
+}
+
+const textarea1 = document.getElementById('ta-example-one');
+const textarea2 = document.getElementById('ta-example-two');
+textarea1.addEventListener('mouseup', onMouseUp, false);
+textarea2.addEventListener('mouseup', onMouseUp, false);
+ +

Result

+ +

{{ EmbedLiveSample('Example', '400', '400') }}

+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', 'interaction.html#dom-document-activeelement', 'activeElement')}}{{Spec2('HTML WHATWG')}}
+ +

Browser compatibility

+ +
+ + +

{{Compat("api.DocumentOrShadowRoot.activeElement")}}

+
diff --git a/files/zh-cn/web/api/documentorshadowroot/activeelement/index.html b/files/zh-cn/web/api/documentorshadowroot/activeelement/index.html deleted file mode 100644 index 90b67fbf5c..0000000000 --- a/files/zh-cn/web/api/documentorshadowroot/activeelement/index.html +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: DocumentOrShadowRoot.activeElement -slug: Web/API/DocumentOrShadowRoot/activeElement -translation_of: Web/API/DocumentOrShadowRoot/activeElement ---- -
{{APIRef("Shadow DOM")}}
- -

{{domxref("Document")}} 和 {{domxref("ShadowRoot")}} 接口的 activeElement 只读属性,用来返回当前在DOM或者shadow DOM树中处于聚焦状态的{{domxref("Element")}}。

- -

通常情况下,如果 {{domxref("HTMLInputElement")}} 或者 {{domxref("HTMLTextAreaElement")}}元素中有文字被选中时, activeElement属性就会返回该元素 。这时,你可以调用该元素的{{domxref("Document.selectionStart", "selectionStart")}} 和 {{domxref("Document.selectionEnd", "selectionEnd")}} 属性获取更多选中文字的信息. 其他情况下,焦点元素也可能是{{HTMLElement("select")}}元素 (menu) 或者一个别的 {{HTMLElement("input")}} 元素, 比如 "button", "checkbox", 或者 "radio".

- -

通常用户可以使用tab键来切换页面中的焦点元素获得焦点, 使用空格键使元素active (比如按下一个按钮或者 切换一个 radio). 具体哪些元素可以获得焦点与系统和浏览器的设置有关。比如, 在 macOS 系统上, 不是text input元素默认情况下是不能获得焦点的。

- -
-

Note: Focus (可收到input事件的元素) 和 selection (目前页面被高亮的部分)不是一回事. 你可以通过 {{domxref("window.getSelection()")}}获取当前用户选择的文本.

-
- -

Syntax

- -
element = DocumentOrShadowRoot.activeElement
- -

Value

- -

当前获得焦点的 {{domxref('Element')}} ,如果没有焦点元素,会返回 {{HTMLElement("body")}} 或者 null 。

- -

Example

- -

HTML

- -
<p>Select some text from one of the text areas below:</p>
-
-<form>
-  <textarea name="ta-example-one" id="ta-example-one" rows="7" cols="40">This is Text Area One. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec tincidunt, lorem a porttitor molestie, odio nibh iaculis libero, et accumsan nunc orci eu dui.</textarea>
-  <textarea name="ta-example-two" id="ta-example-two" rows="7" cols="40">This is Text Area Two. Fusce ullamcorper, nisl ac porttitor adipiscing, urna orci egestas libero, ut accumsan orci lacus laoreet diam. Morbi sed euismod diam.</textarea>
-</form>
-
-<p>Active element ID: <b id="output-element"></b></p>
-<p>Selected text: <b id="output-text"></b></p>
- -

JavaScript

- -
function onMouseUp(e) {
-  const activeTextarea = document.activeElement;
-  const selection = activeTextarea.value.substring(
-    activeTextarea.selectionStart, activeTextarea.selectionEnd
-  );
-
-  const outputElement = document.getElementById('output-element');
-  const outputText = document.getElementById('output-text');
-  outputElement.innerHTML = activeTextarea.id;
-  outputText.innerHTML = selection;
-}
-
-const textarea1 = document.getElementById('ta-example-one');
-const textarea2 = document.getElementById('ta-example-two');
-textarea1.addEventListener('mouseup', onMouseUp, false);
-textarea2.addEventListener('mouseup', onMouseUp, false);
- -

Result

- -

{{ EmbedLiveSample('Example', '400', '400') }}

- -

Specifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML WHATWG', 'interaction.html#dom-document-activeelement', 'activeElement')}}{{Spec2('HTML WHATWG')}}
- -

Browser compatibility

- -
- - -

{{Compat("api.DocumentOrShadowRoot.activeElement")}}

-
diff --git a/files/zh-cn/web/api/element/nextelementsibling/index.html b/files/zh-cn/web/api/element/nextelementsibling/index.html new file mode 100644 index 0000000000..a39fd29558 --- /dev/null +++ b/files/zh-cn/web/api/element/nextelementsibling/index.html @@ -0,0 +1,167 @@ +--- +title: NonDocumentTypeChildNode.nextElementSibling +slug: Web/API/NonDocumentTypeChildNode/nextElementSibling +translation_of: Web/API/NonDocumentTypeChildNode/nextElementSibling +--- +

{{ gecko_minversion_header("1.9.1") }}

+ +

{{ ApiRef() }}

+ +

概述

+ +

nextElementSibling 返回当前元素在其父元素的子元素节点中的后一个元素节点,如果该元素已经是最后一个元素节点,则返回null,该属性是只读的.

+ +

语法

+ +
var nextNode = elementNodeReference.nextElementSibling;
+
+ +

例子

+ +
<div id="div-01">Here is div-01</div>
+<div id="div-02">Here is div-02</div>
+
+<script type="text/javascript">
+  var el = document.getElementById('div-01').nextElementSibling;
+  document.write('<p>Siblings of div-01</p><ol>');
+  while (el) {
+    document.write('<li>' + el.nodeName + '</li>');
+    el = el.nextElementSibling;
+  }
+  document.write('</ol>');
+</script>
+
+ +

上面的例子会输出以下内容:

+ +
Siblings of div-01
+
+   1. DIV
+   2. SCRIPT
+   3. P
+   4. OL
+ +

 

+ +

Internet Explorer 8 支持补丁

+ +

该属性不支持IE9之前的版本, 下面的代码片段可以增进对IE8的支持:

+ +
// Source: https://github.com/Alhadis/Snippets/blob/master/js/polyfills/IE8-child-elements.js
+if(!("nextElementSibling" in document.documentElement)){
+    Object.defineProperty(Element.prototype, "nextElementSibling", {
+        get: function(){
+            var e = this.nextSibling;
+            while(e && 1 !== e.nodeType)
+                e = e.nextSibling;
+            return e;
+        }
+    });
+}
+
+ +

Internet Explorer 9+ 和 Safari支持补丁

+ +
// Source: https://github.com/jserz/js_piece/blob/master/DOM/NonDocumentTypeChildNode/nextElementSibling/nextElementSibling.md
+(function (arr) {
+  arr.forEach(function (item) {
+    if (item.hasOwnProperty('nextElementSibling')) {
+      return;
+    }
+    Object.defineProperty(item, 'nextElementSibling', {
+      configurable: true,
+      enumerable: true,
+      get: function () {
+        var el = this;
+        while (el = el.nextSibling) {
+          if (el.nodeType === 1) {
+              return el;
+          }
+        }
+        return null;
+      },
+      set: undefined
+    });
+  });
+})([Element.prototype, CharacterData.prototype]);
+ +

浏览器兼容性

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support (on {{domxref("Element")}})4{{CompatGeckoDesktop("1.9.1")}}99.84
Support on {{domxref("CharacterData")}}29.0{{CompatGeckoDesktop("25")}} [1]{{CompatNo}}16.0{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support (on {{domxref("Element")}}){{CompatVersionUnknown}}{{CompatGeckoMobile("1.9.1")}}{{CompatVersionUnknown}}9.8{{CompatVersionUnknown}}
Support on {{domxref("CharacterData")}}{{CompatVersionUnknown}}{{CompatGeckoMobile("25")}}{{CompatNo}}16.0{{CompatNo}}
+
+ +

 

+ +

相关链接

+ + + +

{{ languages( {"en": "en/DOM/element.nextElementSibling" } ) }}

diff --git a/files/zh-cn/web/api/element/previouselementsibling/index.html b/files/zh-cn/web/api/element/previouselementsibling/index.html new file mode 100644 index 0000000000..8c78a68adf --- /dev/null +++ b/files/zh-cn/web/api/element/previouselementsibling/index.html @@ -0,0 +1,118 @@ +--- +title: NonDocumentTypeChildNode.previousElementSibling +slug: Web/API/NonDocumentTypeChildNode/previousElementSibling +translation_of: Web/API/NonDocumentTypeChildNode/previousElementSibling +--- +

{{ ApiRef() }}

+ +

概述

+ +

previousElementSibling 返回当前元素在其父元素的子元素节点中的前一个元素节点,如果该元素已经是第一个元素节点,则返回null,该属性是只读的.

+ +

语法

+ +
var prevNode = elementNodeReference.previousElementSibling;
+
+ +

例子

+ +
<div id="div-01">Here is div-01</div>
+<div id="div-02">Here is div-02</div>
+<li>This is a list item</li>
+<li>This is another list item</li>
+<div id="div-03">Here is div-03</div>
+
+<script type="text/javascript">
+  var el = document.getElementById('div-03').previousElementSibling;
+  document.write('<p>Siblings of div-03</p><ol>');
+  while (el) {
+    document.write('<li>' + el.nodeName + '</li>');
+    el = el.previousElementSibling;
+  }
+  document.write('</ol>');
+</script>
+
+ +

上面的例子会输出以下内容:

+ +
Siblings of div-03
+
+   1. LI
+   2. LI
+   3. DIV
+   4. DIV
+
+ +

浏览器兼容性

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support4{{ CompatGeckoDesktop("1.9.1") }}99.84
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support (on {{domxref("Element")}}){{CompatVersionUnknown}}{{CompatGeckoMobile("1.9.1")}}{{CompatVersionUnknown}}9.8{{CompatVersionUnknown}}
Support on {{domxref("CharacterData")}}{{CompatVersionUnknown}}{{CompatGeckoMobile("25")}}{{CompatNo}}16.0{{CompatNo}}
+
+ +

规范

+ +

Element Traversal Specification: previousElementSibling

+ +

相关链接

+ + + +

{{ languages( {"en": "en/DOM/element.previousElementSibling" } ) }}

diff --git a/files/zh-cn/web/api/htmlanchorelement/hash/index.html b/files/zh-cn/web/api/htmlanchorelement/hash/index.html new file mode 100644 index 0000000000..afb17d505e --- /dev/null +++ b/files/zh-cn/web/api/htmlanchorelement/hash/index.html @@ -0,0 +1,110 @@ +--- +title: HTMLHyperlinkElementUtils.hash +slug: Web/API/HTMLHyperlinkElementUtils/hash +tags: + - HTMLHyperlinkElementUtils.hash +translation_of: Web/API/HTMLHyperlinkElementUtils/hash +original_slug: Web/API/URLUtils/hash +--- +

{{ APIRef("URLUtils") }}

+ +

HTMLHyperlinkElementUtils.hash 属性返回一个包含“#”的 {{domxref("DOMString")}} , 后跟URL的片段标识符。

+ +

片段没有百分比解码。如果URL没有包含片段标识符,这个属性为一个空的字符串, "".

+ +

Syntax

+ +
string = object.hash;
+object.hash = string;
+
+ +

Examples

+ +
// Let's an <a id="myAnchor" href="https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.href#youhou"> element be in the document
+var anchor = document.getElementById("myAnchor");
+var result = anchor.hash; // Returns:'#youhou'
+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', '#dom-hyperlink-hash', 'HTMLHyperlinkElementUtils.hash')}}{{Spec2('HTML WHATWG')}}Initial definition
+ +

Browser compatibility

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}}{{CompatGeckoDesktop("22")}}[3]{{CompatNo}}[2]{{CompatNo}}[2]{{CompatNo}}[2]
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroid WebviewChrome for AndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}}{{CompatGeckoMobile("22")}}[3]{{CompatNo}}[2]{{CompatNo}}[2]{{CompatNo}}[2]
+
+ +

[1] Starting in Chrome 52, this property was moved to {{domxref('URL')}}

+ +

[2] Though not grouped in a single abstract interface, this method is directly available on the interfaces that implement it, if this interface is supported.

+ +

[3] From Gecko 22 to Gecko 44, this property was on the URLUtils mixin. It has been moves either on the HTMLHyperlinkElementUtils mixin, or directly on the interface. Also, from Gecko 29 to Gecko 40, the returned value was incorrectly percent-decoded.

+ +

See also

+ + diff --git a/files/zh-cn/web/api/htmlanchorelement/href/index.html b/files/zh-cn/web/api/htmlanchorelement/href/index.html new file mode 100644 index 0000000000..dd9cbd64f3 --- /dev/null +++ b/files/zh-cn/web/api/htmlanchorelement/href/index.html @@ -0,0 +1,109 @@ +--- +title: HTMLHyperlinkElementUtils.href +slug: Web/API/HTMLHyperlinkElementUtils/href +tags: + - HTMLHyperlinkElementUtils.href +translation_of: Web/API/HTMLHyperlinkElementUtils/href +original_slug: Web/API/URLUtils/href +--- +

{{ApiRef("URL API")}}

+ +

HTMLHyperlinkElementUtils.href 属性是一个包含整个URL的 {{domxref("USVString")}}。

+ +

Syntax

+ +
string = object.href;
+object.href = string;
+
+ +

Examples

+ +
// Lets imagine an <a id="myAnchor" href="https://developer.mozilla.org/en-US/HTMLHyperlinkElementUtils/href"> element is in the document
+var anchor = document.getElementById("myAnchor");
+var result = anchor.href; // Returns: 'https://developer.mozilla.org/en-US/HTMLHyperlinkElementUtils/href'
+
+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', '#dom-hyperlink-href', 'HTMLHyperlinkElementUtils.href')}}{{Spec2('HTML WHATWG')}}Initial definition.
+ +

Browser compatibility

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}}{{CompatGeckoDesktop("22")}} [3]{{CompatNo}} [2]{{CompatNo}} [2]{{CompatNo}} [2]
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroid WebviewChrome for AndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}}{{CompatGeckoMobile("22")}} [3]{{CompatNo}} [2]{{CompatNo}} [2]{{CompatNo}} [2]
+
+ +

[1] Starting in Chrome 52, this property was moved to {{domxref('URL')}}

+ +

[2] Though not grouped in a single abstract interface, this method is directly available on the interfaces that implement it, if this interface is supported.

+ +

[3] From Gecko 22 to Gecko 44, this property was on the URLUtils mixin. It has been moved either on the HTMLHyperlinkElementUtils mixin, or directly on the interface.

+ +

See also

+ + diff --git a/files/zh-cn/web/api/htmlanchorelement/origin/index.html b/files/zh-cn/web/api/htmlanchorelement/origin/index.html new file mode 100644 index 0000000000..6b1eb90cda --- /dev/null +++ b/files/zh-cn/web/api/htmlanchorelement/origin/index.html @@ -0,0 +1,117 @@ +--- +title: HTMLHyperlinkElementUtils.origin +slug: Web/API/HTMLHyperlinkElementUtils/origin +tags: + - HTMLHyperlinkElementUtils.origin +translation_of: Web/API/HTMLHyperlinkElementUtils/origin +original_slug: Web/API/URLUtils/origin +--- +

{{APIRef("URL API")}}

+ +

HTMLHyperlinkElementUtils.origin 只读属性是一个 {{domxref("USVString")}} ,其中包含代表URL的原始码的Unicode序列化,即:

+ + + +

{{AvailableInWorkers}}

+ +

Syntax

+ +
string = object.origin;
+
+ +

Examples

+ +
// On this page, returns the origin
+var result = window.location.origin; // Returns:'https://developer.mozilla.org'
+
+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', '#dom-hyperlink-origin', 'HTMLHyperlinkElementUtils.origin')}}{{Spec2('HTML WHATWG')}}Initial definition.
+ +

Browser compatibility

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}}{{CompatGeckoDesktop("26.0")}} [3][4]{{CompatNo}} [2]{{CompatNo}} [2]{{CompatNo}} [2]
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroid WebviewChrome for AndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}}{{CompatGeckoMobile("26.0")}} [3][4]{{CompatNo}} [2]{{CompatNo}} [2]{{CompatNo}} [2]
+
+ +

[1] Starting in Chrome 52, this property was moved to {{domxref('URL')}}

+ +

[2] Though not grouped in a single abstract interface, this method is directly available on the interfaces that implement it, if this interface is supported.

+ +

[3] From Gecko 26 to Gecko 44, this property was on the URLUtils mixin. It has been moves either on the HTMLHyperlinkElementUtils mixin, or directly on the interface.

+ +

[4] Before Gecko 49, results for URL using the blob scheme incorrectly returned null.

+ +

See also

+ + diff --git a/files/zh-cn/web/api/htmlanchorelement/password/index.html b/files/zh-cn/web/api/htmlanchorelement/password/index.html new file mode 100644 index 0000000000..0358323ce9 --- /dev/null +++ b/files/zh-cn/web/api/htmlanchorelement/password/index.html @@ -0,0 +1,105 @@ +--- +title: HTMLHyperlinkElementUtils.password +slug: Web/API/HTMLHyperlinkElementUtils/password +tags: + - HTMLHyperlinkElementUtils.password +translation_of: Web/API/HTMLHyperlinkElementUtils/password +original_slug: Web/API/URLUtils/password +--- +

{{ApiRef("URL API")}}

+ +

HTMLHyperlinkElementUtils.password property 属性是一个{{domxref("USVString")}} ,包含域名前面指定的密码。

+ +

如果在没有首先设置用户名属性的情况下设置,则会静默失败。

+ +

Syntax

+ +
string = object.password;
+object.password = string;
+
+ +

Examples

+ +
// Let's <a id="myAnchor" href="https://anonymous:flabada@developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.username"> be in the document
+var anchor = document.getElementByID("myAnchor");
+var result = anchor.password; // Returns:'flabada'
+
+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', '#dom-hyperlink-prassword', 'HTMLHyperlinkElementUtils.password')}}{{Spec2('HTML WHATWG')}}Initial definition.
+ +

Browser compatibility

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatVersionUnknown}} [1]{{CompatGeckoDesktop("26")}} [2]{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureAndroid WebviewChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}} [1]{{CompatGeckoMobile("26")}} [2]{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

[1] Starting in Chrome 52, this property was moved to {{domxref('URL')}}

+ +

[2] From Gecko 26 to Gecko 44, this property was on the URLUtils mixin. It has been moves either on the HTMLHyperlinkElementUtils mixin, or directly on the interface.

+ +

See also

+ + diff --git a/files/zh-cn/web/api/htmlanchorelement/pathname/index.html b/files/zh-cn/web/api/htmlanchorelement/pathname/index.html new file mode 100644 index 0000000000..95ceda3636 --- /dev/null +++ b/files/zh-cn/web/api/htmlanchorelement/pathname/index.html @@ -0,0 +1,111 @@ +--- +title: HTMLHyperlinkElementUtils.pathname +slug: Web/API/HTMLHyperlinkElementUtils/pathname +tags: + - HTMLHyperlinkElementUtils.pathname +translation_of: Web/API/HTMLHyperlinkElementUtils/pathname +original_slug: Web/API/URLUtils/pathname +--- +

{{ApiRef("URL API")}}

+ +

HTMLHyperlinkElementUtils.pathname 属性是一个 {{domxref("USVString")}} ,其中包含一个初始的'/'后跟URL的路径。

+ +

Syntax

+ +
string = object.pathname;
+object.pathname = string;
+
+ +

Examples

+ +
// Let's an <a id="myAnchor" href="https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.pathname"> element be in the document
+var anchor = document.getElementById("myAnchor");
+var result = anchor.pathname; // Returns:'/en-US/docs/HTMLHyperlinkElementUtils.pathname'
+
+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', '#dom-hyperlink-pathname', 'HTMLHyperlinkElementUtils.pathname')}}{{Spec2('HTML WHATWG')}}Initial definition.
+ +

Browser compatibility

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatVersionUnknown}} [1]{{CompatNo}} [2]{{CompatGeckoDesktop("22")}} [3][4]{{CompatNo}} [2]{{CompatNo}} [2]{{CompatNo}} [2]
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroid WebviewChrome for AndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}} [1]{{CompatNo}} [2]{{CompatGeckoMobile("22")}} [3][4]{{CompatNo}} [2]{{CompatNo}} [2]{{CompatNo}} [2]
+
+ +

[1] Starting in Chrome 52, this property was moved to {{domxref('URL')}}

+ +

[2] Though not grouped in a single abstract interface, this method is directly available on the interfaces that implement it, if this interface is supported.

+ +

[3] From Gecko 22 to Gecko 44, this property was on the URLUtils mixin. It has been moves either on the HTMLHyperlinkElementUtils mixin, or directly on the interface.

+ +

[4] Before Firefox 53, the pathname and search HTMLHyperLinkElementUtils properties returned the wrong parts of the URL. For example, for a URL of http://z.com/x?a=true&b=false, pathname would return "/x?a=true&b=false" and search would return "", rather than "/x" and "?a=true&b=false" respectively. This has now been fixed.

+ +

See also

+ + diff --git a/files/zh-cn/web/api/htmlanchorelement/search/index.html b/files/zh-cn/web/api/htmlanchorelement/search/index.html new file mode 100644 index 0000000000..1fc142cc1f --- /dev/null +++ b/files/zh-cn/web/api/htmlanchorelement/search/index.html @@ -0,0 +1,117 @@ +--- +title: HTMLHyperlinkElementUtils.search +slug: Web/API/HTMLHyperlinkElementUtils/search +tags: + - HTMLHyperlinkElementUtils.search +translation_of: Web/API/HTMLHyperlinkElementUtils/search +original_slug: Web/API/URLUtils/search +--- +

{{ApiRef("URL API")}}

+ +

HTMLHyperlinkElementUtils.search 属性是一个搜索字符串,也叫做查询字符串, 它是一个 {{domxref("USVString")}} ,包含 '?' 和随后的 URL 参数。

+ +

语法

+ +
string = object.search;
+object.search = string;
+
+ +

示例

+ +
// 让一个
+// <a id="myAnchor" href="https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.search?q=123" />
+//  元素在文档里
+
+let anchor = document.getElementById("myAnchor");
+let result = anchor.search;
+// 返回:'?q=123'
+
+ +

 

+ +

规范

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', '#dom-hyperlink-search', 'HTMLHyperlinkElementUtils.search')}}{{Spec2('HTML WHATWG')}}初始定义
+ +

浏览器兼容性

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
基本支持{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}}{{CompatGeckoDesktop("22")}} [3][4]{{CompatVersionUnknown}} [2]{{CompatVersionUnknown}} [2]{{CompatVersionUnknown}} [2]
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroid WebviewChrome for AndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
基本支持{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}}{{CompatGeckoMobile("22")}} [3][4]{{CompatVersionUnknown}} [2]{{CompatVersionUnknown}} [2]{{CompatVersionUnknown}} [2]
+
+ +

[1] 自Chrome 52起,该属性移至{{domxref('URL')}}

+ +

[2] 虽然没有被分在一个独立的抽象接口,但该方法可以在实现了它的那些接口上直接使用,如果支持该接口。

+ +

[3] 从Gecko 22 到 Gecko 44,该属性在 URLUtils mixin 上。它已经被移到 HTMLHyperlinkElementUtils mixin,或者直接在这个接口上。

+ +

[4] 在 Firefox 53之前, pathname search HTMLHyperLinkElementUtils 属性返回的URL部分是错误的。例如,对一个值为 http://z.com/x?a=true&b=false 的URL,pathname 会返回"/x?a=true&b=false" ,search 会返回 "", 而不是各自返回 "/x" 和"?a=true&b=false" 。这已经被修正了。

+ +

相关链接

+ + diff --git a/files/zh-cn/web/api/htmlanchorelement/tostring/index.html b/files/zh-cn/web/api/htmlanchorelement/tostring/index.html new file mode 100644 index 0000000000..1bffe5100b --- /dev/null +++ b/files/zh-cn/web/api/htmlanchorelement/tostring/index.html @@ -0,0 +1,111 @@ +--- +title: HTMLHyperlinkElementUtils.toString() +slug: Web/API/HTMLHyperlinkElementUtils/toString +tags: + - HTMLHyperlinkElementUtils.toString() + - URL API +translation_of: Web/API/HTMLHyperlinkElementUtils/toString +original_slug: Web/API/URLUtils/toString +--- +

{{ApiRef("URL API")}}

+ +

HTMLHyperlinkElementUtils.toString() 方法返回一个包含整个URL的 {{domxref("USVString")}} 。它是{{domxref("HTMLHyperlinkElementUtils.href")}} 的一个只读版本。

+ +

句法

+ +
string = object.toString();
+ +

范例

+ +
/*
+Let's imagine an
+<a id="myAnchor" href="https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils/toString">
+ element is in the document
+*/
+var anchor = document.getElementById("myAnchor");
+var result = anchor.toString();
+// Returns: 'https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils/toString'
+
+ +

规范

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', '#htmlhyperlinkelementutils', 'HTMLHyperlinkElementUtils.toString()')}}{{Spec2('HTML WHATWG')}}Initial definition.
+ +

浏览器兼容性

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatChrome(52)}}{{CompatVersionUnknown}}{{CompatGeckoDesktop("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroid WebviewChrome for AndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatChrome(52)}}{{CompatChrome(52)}}{{CompatVersionUnknown}}{{CompatGeckoMobile("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
+
+ +

[1] Though not grouped in a single abstract interface, this method is directly available on the interfaces that implement it, if this interface is supported.

+ +

[2] From Gecko 22 to Gecko 44, this property was on the URLUtils mixin. It has been moves either on the HTMLHyperlinkElementUtils mixin, or directly on the interface.

+ +

也可以看看

+ + diff --git a/files/zh-cn/web/api/htmlanchorelement/username/index.html b/files/zh-cn/web/api/htmlanchorelement/username/index.html new file mode 100644 index 0000000000..f7a9df9f66 --- /dev/null +++ b/files/zh-cn/web/api/htmlanchorelement/username/index.html @@ -0,0 +1,103 @@ +--- +title: HTMLHyperlinkElementUtils.username +slug: Web/API/HTMLHyperlinkElementUtils/username +tags: + - HTMLHyperlinkElementUtils.username +translation_of: Web/API/HTMLHyperlinkElementUtils/username +original_slug: Web/API/URLUtils/username +--- +

{{ApiRef("URL API")}}

+ +

HTMLHyperlinkElementUtils.username 属性是一个 {{domxref("USVString")}}包含域名前面指定的用户名。

+ +

Syntax

+ +
string = object.username;
+object.username = string;
+
+ +

Examples

+ +
// Let's <a id="myAnchor" href="https://anonymous:flabada@developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.username"> be in the document
+var anchor = document.getElementByID("myAnchor");
+var result = anchor.username; // Returns:'anonymous'
+
+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', '#dom-hyperlink-username', 'HTMLHyperlinkElementUtils.username')}}{{Spec2('HTML WHATWG')}}Initial definition.
+ +

Browser compatibility

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatVersionUnknown}} [1]{{CompatGeckoDesktop("26")}} [2]{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureAndroid WebviewChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}} [1]{{CompatGeckoMobile("26")}} [2]{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

[1] Starting in Chrome 52, this property was moved to {{domxref('URL')}}

+ +

[2] From Gecko 26 to Gecko 44, this property was on the URLUtils mixin. It has been moves either on the HTMLHyperlinkElementUtils mixin, or directly on the interface.

+ +

See also

+ + diff --git a/files/zh-cn/web/api/htmlhyperlinkelementutils/hash/index.html b/files/zh-cn/web/api/htmlhyperlinkelementutils/hash/index.html deleted file mode 100644 index afb17d505e..0000000000 --- a/files/zh-cn/web/api/htmlhyperlinkelementutils/hash/index.html +++ /dev/null @@ -1,110 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.hash -slug: Web/API/HTMLHyperlinkElementUtils/hash -tags: - - HTMLHyperlinkElementUtils.hash -translation_of: Web/API/HTMLHyperlinkElementUtils/hash -original_slug: Web/API/URLUtils/hash ---- -

{{ APIRef("URLUtils") }}

- -

HTMLHyperlinkElementUtils.hash 属性返回一个包含“#”的 {{domxref("DOMString")}} , 后跟URL的片段标识符。

- -

片段没有百分比解码。如果URL没有包含片段标识符,这个属性为一个空的字符串, "".

- -

Syntax

- -
string = object.hash;
-object.hash = string;
-
- -

Examples

- -
// Let's an <a id="myAnchor" href="https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.href#youhou"> element be in the document
-var anchor = document.getElementById("myAnchor");
-var result = anchor.hash; // Returns:'#youhou'
- -

Specifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML WHATWG', '#dom-hyperlink-hash', 'HTMLHyperlinkElementUtils.hash')}}{{Spec2('HTML WHATWG')}}Initial definition
- -

Browser compatibility

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - - - -
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}}{{CompatGeckoDesktop("22")}}[3]{{CompatNo}}[2]{{CompatNo}}[2]{{CompatNo}}[2]
-
- -
- - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroid WebviewChrome for AndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}}{{CompatGeckoMobile("22")}}[3]{{CompatNo}}[2]{{CompatNo}}[2]{{CompatNo}}[2]
-
- -

[1] Starting in Chrome 52, this property was moved to {{domxref('URL')}}

- -

[2] Though not grouped in a single abstract interface, this method is directly available on the interfaces that implement it, if this interface is supported.

- -

[3] From Gecko 22 to Gecko 44, this property was on the URLUtils mixin. It has been moves either on the HTMLHyperlinkElementUtils mixin, or directly on the interface. Also, from Gecko 29 to Gecko 40, the returned value was incorrectly percent-decoded.

- -

See also

- - diff --git a/files/zh-cn/web/api/htmlhyperlinkelementutils/href/index.html b/files/zh-cn/web/api/htmlhyperlinkelementutils/href/index.html deleted file mode 100644 index dd9cbd64f3..0000000000 --- a/files/zh-cn/web/api/htmlhyperlinkelementutils/href/index.html +++ /dev/null @@ -1,109 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.href -slug: Web/API/HTMLHyperlinkElementUtils/href -tags: - - HTMLHyperlinkElementUtils.href -translation_of: Web/API/HTMLHyperlinkElementUtils/href -original_slug: Web/API/URLUtils/href ---- -

{{ApiRef("URL API")}}

- -

HTMLHyperlinkElementUtils.href 属性是一个包含整个URL的 {{domxref("USVString")}}。

- -

Syntax

- -
string = object.href;
-object.href = string;
-
- -

Examples

- -
// Lets imagine an <a id="myAnchor" href="https://developer.mozilla.org/en-US/HTMLHyperlinkElementUtils/href"> element is in the document
-var anchor = document.getElementById("myAnchor");
-var result = anchor.href; // Returns: 'https://developer.mozilla.org/en-US/HTMLHyperlinkElementUtils/href'
-
- -

Specifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML WHATWG', '#dom-hyperlink-href', 'HTMLHyperlinkElementUtils.href')}}{{Spec2('HTML WHATWG')}}Initial definition.
- -

Browser compatibility

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - - - -
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}}{{CompatGeckoDesktop("22")}} [3]{{CompatNo}} [2]{{CompatNo}} [2]{{CompatNo}} [2]
-
- -
- - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroid WebviewChrome for AndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}}{{CompatGeckoMobile("22")}} [3]{{CompatNo}} [2]{{CompatNo}} [2]{{CompatNo}} [2]
-
- -

[1] Starting in Chrome 52, this property was moved to {{domxref('URL')}}

- -

[2] Though not grouped in a single abstract interface, this method is directly available on the interfaces that implement it, if this interface is supported.

- -

[3] From Gecko 22 to Gecko 44, this property was on the URLUtils mixin. It has been moved either on the HTMLHyperlinkElementUtils mixin, or directly on the interface.

- -

See also

- - diff --git a/files/zh-cn/web/api/htmlhyperlinkelementutils/index.html b/files/zh-cn/web/api/htmlhyperlinkelementutils/index.html deleted file mode 100644 index d6d93674e3..0000000000 --- a/files/zh-cn/web/api/htmlhyperlinkelementutils/index.html +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: URLUtils -slug: Web/API/HTMLHyperlinkElementUtils -translation_of: Web/API/HTMLHyperlinkElementUtils -original_slug: Web/API/URLUtils ---- -

{{ApiRef("URL API")}}{{SeeCompatTable}}

- -

The HTMLHyperlinkElementUtils mixin defines utility methods and properties to work with {{domxref("HTMLAnchorElement")}} and {{domxref("HTMLAreaElement")}}. These utilities allow to deal with common features like URLs.

- -

There are no objects of this type, but several objects {{domxref("HTMLAnchorElement")}} and {{domxref("HTMLAreaElement")}} implement it.

- -

属性

- -
-

注意:This interface doesn't inherit any property.

-
- -
-
{{domxref("HTMLHyperlinkElementUtils.href")}}
-
This is a {{domxref("USVString")}} containing the whole URL.
-
{{domxref("HTMLHyperlinkElementUtils.protocol")}}
-
This is a {{domxref("USVString")}} containing the protocol scheme of the URL, including the final ':'.
-
{{domxref("HTMLHyperlinkElementUtils.host")}}
-
This is a {{domxref("USVString")}} containing the host, that is the hostname, and then, if the port of the URL is not empty (which can happen because it was not specified or because it was specified to be the default port of the URL's scheme), a ':', and the port of the URL.
-
{{domxref("HTMLHyperlinkElementUtils.hostname")}}
-
This is a {{domxref("USVString")}} containing the domain of the URL.
-
{{domxref("HTMLHyperlinkElementUtils.port")}}
-
This is a {{domxref("USVString")}} containing the port number of the URL.
-
{{domxref("HTMLHyperlinkElementUtils.pathname")}}
-
This is a {{domxref("USVString")}} containing an initial '/' followed by the path of the URL.
-
{{domxref("HTMLHyperlinkElementUtils.search")}}
-
This is a {{domxref("USVString")}} containing a '?' followed by the parameters of the URL.
-
{{domxref("HTMLHyperlinkElementUtils.hash")}}
-
This is a {{domxref("USVString")}} containing a '#' followed by the fragment identifier of the URL.
-
{{domxref("HTMLHyperlinkElementUtils.username")}}
-
This is a {{domxref("USVString")}} containing the username specified before the domain name.
-
{{domxref("HTMLHyperlinkElementUtils.password")}}
-
This is a {{domxref("USVString")}} containing the password specified before the domain name.
-
{{domxref("HTMLHyperlinkElementUtils.origin")}} {{readonlyInline}}
-
This returns a {{domxref("USVString")}} containing the origin of the URL (that is its scheme, its domain and its port).
-
- -

方法

- -
-

注意:This interface doesn't inherit any method.

-
- -
-
{{domxref("HTMLHyperlinkElementUtils.toString()")}}
-
This returns a {{domxref("USVString")}} containing the whole URL. It is a synonym for {{domxref("HTMLHyperlinkElementUtils.href")}}, though it can't be used to modify the value.
-
- -

规范

- - - - - - - - - - - - - - - - -
规范状态备注
{{SpecName('HTML WHATWG', '#htmlhyperlinkelementutils', 'HTMLHyperlinkElementUtils')}}{{Spec2('HTML WHATWG')}}Initial definition
- -

浏览器兼容性

- - - -

{{Compat("api.HTMLHyperlinkElementUtils")}}

- -

参见

- - diff --git a/files/zh-cn/web/api/htmlhyperlinkelementutils/origin/index.html b/files/zh-cn/web/api/htmlhyperlinkelementutils/origin/index.html deleted file mode 100644 index 6b1eb90cda..0000000000 --- a/files/zh-cn/web/api/htmlhyperlinkelementutils/origin/index.html +++ /dev/null @@ -1,117 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.origin -slug: Web/API/HTMLHyperlinkElementUtils/origin -tags: - - HTMLHyperlinkElementUtils.origin -translation_of: Web/API/HTMLHyperlinkElementUtils/origin -original_slug: Web/API/URLUtils/origin ---- -

{{APIRef("URL API")}}

- -

HTMLHyperlinkElementUtils.origin 只读属性是一个 {{domxref("USVString")}} ,其中包含代表URL的原始码的Unicode序列化,即:

- - - -

{{AvailableInWorkers}}

- -

Syntax

- -
string = object.origin;
-
- -

Examples

- -
// On this page, returns the origin
-var result = window.location.origin; // Returns:'https://developer.mozilla.org'
-
- -

Specifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML WHATWG', '#dom-hyperlink-origin', 'HTMLHyperlinkElementUtils.origin')}}{{Spec2('HTML WHATWG')}}Initial definition.
- -

Browser compatibility

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - - - -
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}}{{CompatGeckoDesktop("26.0")}} [3][4]{{CompatNo}} [2]{{CompatNo}} [2]{{CompatNo}} [2]
-
- -
- - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroid WebviewChrome for AndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}}{{CompatGeckoMobile("26.0")}} [3][4]{{CompatNo}} [2]{{CompatNo}} [2]{{CompatNo}} [2]
-
- -

[1] Starting in Chrome 52, this property was moved to {{domxref('URL')}}

- -

[2] Though not grouped in a single abstract interface, this method is directly available on the interfaces that implement it, if this interface is supported.

- -

[3] From Gecko 26 to Gecko 44, this property was on the URLUtils mixin. It has been moves either on the HTMLHyperlinkElementUtils mixin, or directly on the interface.

- -

[4] Before Gecko 49, results for URL using the blob scheme incorrectly returned null.

- -

See also

- - diff --git a/files/zh-cn/web/api/htmlhyperlinkelementutils/password/index.html b/files/zh-cn/web/api/htmlhyperlinkelementutils/password/index.html deleted file mode 100644 index 0358323ce9..0000000000 --- a/files/zh-cn/web/api/htmlhyperlinkelementutils/password/index.html +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.password -slug: Web/API/HTMLHyperlinkElementUtils/password -tags: - - HTMLHyperlinkElementUtils.password -translation_of: Web/API/HTMLHyperlinkElementUtils/password -original_slug: Web/API/URLUtils/password ---- -

{{ApiRef("URL API")}}

- -

HTMLHyperlinkElementUtils.password property 属性是一个{{domxref("USVString")}} ,包含域名前面指定的密码。

- -

如果在没有首先设置用户名属性的情况下设置,则会静默失败。

- -

Syntax

- -
string = object.password;
-object.password = string;
-
- -

Examples

- -
// Let's <a id="myAnchor" href="https://anonymous:flabada@developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.username"> be in the document
-var anchor = document.getElementByID("myAnchor");
-var result = anchor.password; // Returns:'flabada'
-
- -

Specifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML WHATWG', '#dom-hyperlink-prassword', 'HTMLHyperlinkElementUtils.password')}}{{Spec2('HTML WHATWG')}}Initial definition.
- -

Browser compatibility

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatVersionUnknown}} [1]{{CompatGeckoDesktop("26")}} [2]{{CompatNo}}{{CompatNo}}{{CompatNo}}
-
- -
- - - - - - - - - - - - - - - - - - - - - -
FeatureAndroid WebviewChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}} [1]{{CompatGeckoMobile("26")}} [2]{{CompatNo}}{{CompatNo}}{{CompatNo}}
-
- -

[1] Starting in Chrome 52, this property was moved to {{domxref('URL')}}

- -

[2] From Gecko 26 to Gecko 44, this property was on the URLUtils mixin. It has been moves either on the HTMLHyperlinkElementUtils mixin, or directly on the interface.

- -

See also

- - diff --git a/files/zh-cn/web/api/htmlhyperlinkelementutils/pathname/index.html b/files/zh-cn/web/api/htmlhyperlinkelementutils/pathname/index.html deleted file mode 100644 index 95ceda3636..0000000000 --- a/files/zh-cn/web/api/htmlhyperlinkelementutils/pathname/index.html +++ /dev/null @@ -1,111 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.pathname -slug: Web/API/HTMLHyperlinkElementUtils/pathname -tags: - - HTMLHyperlinkElementUtils.pathname -translation_of: Web/API/HTMLHyperlinkElementUtils/pathname -original_slug: Web/API/URLUtils/pathname ---- -

{{ApiRef("URL API")}}

- -

HTMLHyperlinkElementUtils.pathname 属性是一个 {{domxref("USVString")}} ,其中包含一个初始的'/'后跟URL的路径。

- -

Syntax

- -
string = object.pathname;
-object.pathname = string;
-
- -

Examples

- -
// Let's an <a id="myAnchor" href="https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.pathname"> element be in the document
-var anchor = document.getElementById("myAnchor");
-var result = anchor.pathname; // Returns:'/en-US/docs/HTMLHyperlinkElementUtils.pathname'
-
- -

Specifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML WHATWG', '#dom-hyperlink-pathname', 'HTMLHyperlinkElementUtils.pathname')}}{{Spec2('HTML WHATWG')}}Initial definition.
- -

Browser compatibility

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - - - -
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatVersionUnknown}} [1]{{CompatNo}} [2]{{CompatGeckoDesktop("22")}} [3][4]{{CompatNo}} [2]{{CompatNo}} [2]{{CompatNo}} [2]
-
- -
- - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroid WebviewChrome for AndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}} [1]{{CompatNo}} [2]{{CompatGeckoMobile("22")}} [3][4]{{CompatNo}} [2]{{CompatNo}} [2]{{CompatNo}} [2]
-
- -

[1] Starting in Chrome 52, this property was moved to {{domxref('URL')}}

- -

[2] Though not grouped in a single abstract interface, this method is directly available on the interfaces that implement it, if this interface is supported.

- -

[3] From Gecko 22 to Gecko 44, this property was on the URLUtils mixin. It has been moves either on the HTMLHyperlinkElementUtils mixin, or directly on the interface.

- -

[4] Before Firefox 53, the pathname and search HTMLHyperLinkElementUtils properties returned the wrong parts of the URL. For example, for a URL of http://z.com/x?a=true&b=false, pathname would return "/x?a=true&b=false" and search would return "", rather than "/x" and "?a=true&b=false" respectively. This has now been fixed.

- -

See also

- - diff --git a/files/zh-cn/web/api/htmlhyperlinkelementutils/search/index.html b/files/zh-cn/web/api/htmlhyperlinkelementutils/search/index.html deleted file mode 100644 index 1fc142cc1f..0000000000 --- a/files/zh-cn/web/api/htmlhyperlinkelementutils/search/index.html +++ /dev/null @@ -1,117 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.search -slug: Web/API/HTMLHyperlinkElementUtils/search -tags: - - HTMLHyperlinkElementUtils.search -translation_of: Web/API/HTMLHyperlinkElementUtils/search -original_slug: Web/API/URLUtils/search ---- -

{{ApiRef("URL API")}}

- -

HTMLHyperlinkElementUtils.search 属性是一个搜索字符串,也叫做查询字符串, 它是一个 {{domxref("USVString")}} ,包含 '?' 和随后的 URL 参数。

- -

语法

- -
string = object.search;
-object.search = string;
-
- -

示例

- -
// 让一个
-// <a id="myAnchor" href="https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.search?q=123" />
-//  元素在文档里
-
-let anchor = document.getElementById("myAnchor");
-let result = anchor.search;
-// 返回:'?q=123'
-
- -

 

- -

规范

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML WHATWG', '#dom-hyperlink-search', 'HTMLHyperlinkElementUtils.search')}}{{Spec2('HTML WHATWG')}}初始定义
- -

浏览器兼容性

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - - - -
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
基本支持{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}}{{CompatGeckoDesktop("22")}} [3][4]{{CompatVersionUnknown}} [2]{{CompatVersionUnknown}} [2]{{CompatVersionUnknown}} [2]
-
- -
- - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroid WebviewChrome for AndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
基本支持{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}}{{CompatGeckoMobile("22")}} [3][4]{{CompatVersionUnknown}} [2]{{CompatVersionUnknown}} [2]{{CompatVersionUnknown}} [2]
-
- -

[1] 自Chrome 52起,该属性移至{{domxref('URL')}}

- -

[2] 虽然没有被分在一个独立的抽象接口,但该方法可以在实现了它的那些接口上直接使用,如果支持该接口。

- -

[3] 从Gecko 22 到 Gecko 44,该属性在 URLUtils mixin 上。它已经被移到 HTMLHyperlinkElementUtils mixin,或者直接在这个接口上。

- -

[4] 在 Firefox 53之前, pathname search HTMLHyperLinkElementUtils 属性返回的URL部分是错误的。例如,对一个值为 http://z.com/x?a=true&b=false 的URL,pathname 会返回"/x?a=true&b=false" ,search 会返回 "", 而不是各自返回 "/x" 和"?a=true&b=false" 。这已经被修正了。

- -

相关链接

- - diff --git a/files/zh-cn/web/api/htmlhyperlinkelementutils/tostring/index.html b/files/zh-cn/web/api/htmlhyperlinkelementutils/tostring/index.html deleted file mode 100644 index 1bffe5100b..0000000000 --- a/files/zh-cn/web/api/htmlhyperlinkelementutils/tostring/index.html +++ /dev/null @@ -1,111 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.toString() -slug: Web/API/HTMLHyperlinkElementUtils/toString -tags: - - HTMLHyperlinkElementUtils.toString() - - URL API -translation_of: Web/API/HTMLHyperlinkElementUtils/toString -original_slug: Web/API/URLUtils/toString ---- -

{{ApiRef("URL API")}}

- -

HTMLHyperlinkElementUtils.toString() 方法返回一个包含整个URL的 {{domxref("USVString")}} 。它是{{domxref("HTMLHyperlinkElementUtils.href")}} 的一个只读版本。

- -

句法

- -
string = object.toString();
- -

范例

- -
/*
-Let's imagine an
-<a id="myAnchor" href="https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils/toString">
- element is in the document
-*/
-var anchor = document.getElementById("myAnchor");
-var result = anchor.toString();
-// Returns: 'https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils/toString'
-
- -

规范

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML WHATWG', '#htmlhyperlinkelementutils', 'HTMLHyperlinkElementUtils.toString()')}}{{Spec2('HTML WHATWG')}}Initial definition.
- -

浏览器兼容性

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - - - -
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatChrome(52)}}{{CompatVersionUnknown}}{{CompatGeckoDesktop("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
-
- -
- - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroid WebviewChrome for AndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatChrome(52)}}{{CompatChrome(52)}}{{CompatVersionUnknown}}{{CompatGeckoMobile("22")}} [2]{{CompatNo}} [1]{{CompatNo}} [1]{{CompatNo}} [1]
-
- -

[1] Though not grouped in a single abstract interface, this method is directly available on the interfaces that implement it, if this interface is supported.

- -

[2] From Gecko 22 to Gecko 44, this property was on the URLUtils mixin. It has been moves either on the HTMLHyperlinkElementUtils mixin, or directly on the interface.

- -

也可以看看

- - diff --git a/files/zh-cn/web/api/htmlhyperlinkelementutils/username/index.html b/files/zh-cn/web/api/htmlhyperlinkelementutils/username/index.html deleted file mode 100644 index f7a9df9f66..0000000000 --- a/files/zh-cn/web/api/htmlhyperlinkelementutils/username/index.html +++ /dev/null @@ -1,103 +0,0 @@ ---- -title: HTMLHyperlinkElementUtils.username -slug: Web/API/HTMLHyperlinkElementUtils/username -tags: - - HTMLHyperlinkElementUtils.username -translation_of: Web/API/HTMLHyperlinkElementUtils/username -original_slug: Web/API/URLUtils/username ---- -

{{ApiRef("URL API")}}

- -

HTMLHyperlinkElementUtils.username 属性是一个 {{domxref("USVString")}}包含域名前面指定的用户名。

- -

Syntax

- -
string = object.username;
-object.username = string;
-
- -

Examples

- -
// Let's <a id="myAnchor" href="https://anonymous:flabada@developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.username"> be in the document
-var anchor = document.getElementByID("myAnchor");
-var result = anchor.username; // Returns:'anonymous'
-
- -

Specifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML WHATWG', '#dom-hyperlink-username', 'HTMLHyperlinkElementUtils.username')}}{{Spec2('HTML WHATWG')}}Initial definition.
- -

Browser compatibility

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatVersionUnknown}} [1]{{CompatGeckoDesktop("26")}} [2]{{CompatNo}}{{CompatNo}}{{CompatNo}}
-
- -
- - - - - - - - - - - - - - - - - - - - - -
FeatureAndroid WebviewChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}} [1]{{CompatVersionUnknown}} [1]{{CompatGeckoMobile("26")}} [2]{{CompatNo}}{{CompatNo}}{{CompatNo}}
-
- -

[1] Starting in Chrome 52, this property was moved to {{domxref('URL')}}

- -

[2] From Gecko 26 to Gecko 44, this property was on the URLUtils mixin. It has been moves either on the HTMLHyperlinkElementUtils mixin, or directly on the interface.

- -

See also

- - diff --git a/files/zh-cn/web/api/nondocumenttypechildnode/index.html b/files/zh-cn/web/api/nondocumenttypechildnode/index.html deleted file mode 100644 index bdaccbe5fd..0000000000 --- a/files/zh-cn/web/api/nondocumenttypechildnode/index.html +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: NonDocumentTypeChildNode -slug: Web/API/NonDocumentTypeChildNode -tags: - - API - - DOM - - NonDocumentTypeChildNode - - 参考 - - 接口 -translation_of: Web/API/NonDocumentTypeChildNode ---- -
{{APIRef("DOM")}}
- -

NonDocumentTypeChildNode 接口包含专属于某些(特殊) {{domxref("Node")}} 对象的方法,这些对象可以拥有父对象,但不适用于 {{domxref("DocumentType")}} 接口。

- -

NonDocumentTypeChildNode 是一个裸接口(raw interface),无法创建拥有此类型的对象;它是由 {{domxref("Element")}},和 {{domxref("CharacterData")}} 对象实现的。

- -

属性

- -

此接口没有继承属性。

- -
-
{{domxref("NonDocumentTypeChildNode.previousElementSibling")}} {{readonlyInline}}
-
Returns the {{domxref("Element")}} immediately prior to this node in its parent's children list, or null if there is no {{domxref("Element")}} in the list prior to this node.
-
{{domxref("NonDocumentTypeChildNode.nextElementSibling")}} {{readonlyInline}}
-
Returns the {{domxref("Element")}} immediately following this node in its parent's children list, or null if there is no {{domxref("Element")}} in the list following this node.
-
- -

方法

- -

此接口既没有继承方法,又没有专有方法。

- -

规范

- - - - - - - - - - - - - - - - - - - -
规范状态备注
{{SpecName('DOM WHATWG', '#interface-childnode', 'NonDocumentTypeChildNode')}}{{Spec2('DOM WHATWG')}}Splitted the ElementTraversal interface in {{domxref("ParentNode")}}, {{domxref("ChildNode")}}, and NonDocumentTypeChildNode. The previousElementSibling and nextElementSibling are now defined on the latter.
- The {{domxref("CharacterData")}} and {{domxref("Element")}} implemented the new interfaces.
{{SpecName('Element Traversal', '#interface-elementTraversal', 'ElementTraversal')}}{{Spec2('Element Traversal')}}Added the initial definition of its properties to the ElementTraversal pure interface and use it on {{domxref("Element")}}.
- -

浏览器兼容性

- - - -

{{Compat("api.NonDocumentTypeChildNode")}}

- -

参见

- - diff --git a/files/zh-cn/web/api/nondocumenttypechildnode/nextelementsibling/index.html b/files/zh-cn/web/api/nondocumenttypechildnode/nextelementsibling/index.html deleted file mode 100644 index a39fd29558..0000000000 --- a/files/zh-cn/web/api/nondocumenttypechildnode/nextelementsibling/index.html +++ /dev/null @@ -1,167 +0,0 @@ ---- -title: NonDocumentTypeChildNode.nextElementSibling -slug: Web/API/NonDocumentTypeChildNode/nextElementSibling -translation_of: Web/API/NonDocumentTypeChildNode/nextElementSibling ---- -

{{ gecko_minversion_header("1.9.1") }}

- -

{{ ApiRef() }}

- -

概述

- -

nextElementSibling 返回当前元素在其父元素的子元素节点中的后一个元素节点,如果该元素已经是最后一个元素节点,则返回null,该属性是只读的.

- -

语法

- -
var nextNode = elementNodeReference.nextElementSibling;
-
- -

例子

- -
<div id="div-01">Here is div-01</div>
-<div id="div-02">Here is div-02</div>
-
-<script type="text/javascript">
-  var el = document.getElementById('div-01').nextElementSibling;
-  document.write('<p>Siblings of div-01</p><ol>');
-  while (el) {
-    document.write('<li>' + el.nodeName + '</li>');
-    el = el.nextElementSibling;
-  }
-  document.write('</ol>');
-</script>
-
- -

上面的例子会输出以下内容:

- -
Siblings of div-01
-
-   1. DIV
-   2. SCRIPT
-   3. P
-   4. OL
- -

 

- -

Internet Explorer 8 支持补丁

- -

该属性不支持IE9之前的版本, 下面的代码片段可以增进对IE8的支持:

- -
// Source: https://github.com/Alhadis/Snippets/blob/master/js/polyfills/IE8-child-elements.js
-if(!("nextElementSibling" in document.documentElement)){
-    Object.defineProperty(Element.prototype, "nextElementSibling", {
-        get: function(){
-            var e = this.nextSibling;
-            while(e && 1 !== e.nodeType)
-                e = e.nextSibling;
-            return e;
-        }
-    });
-}
-
- -

Internet Explorer 9+ 和 Safari支持补丁

- -
// Source: https://github.com/jserz/js_piece/blob/master/DOM/NonDocumentTypeChildNode/nextElementSibling/nextElementSibling.md
-(function (arr) {
-  arr.forEach(function (item) {
-    if (item.hasOwnProperty('nextElementSibling')) {
-      return;
-    }
-    Object.defineProperty(item, 'nextElementSibling', {
-      configurable: true,
-      enumerable: true,
-      get: function () {
-        var el = this;
-        while (el = el.nextSibling) {
-          if (el.nodeType === 1) {
-              return el;
-          }
-        }
-        return null;
-      },
-      set: undefined
-    });
-  });
-})([Element.prototype, CharacterData.prototype]);
- -

浏览器兼容性

- -
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support (on {{domxref("Element")}})4{{CompatGeckoDesktop("1.9.1")}}99.84
Support on {{domxref("CharacterData")}}29.0{{CompatGeckoDesktop("25")}} [1]{{CompatNo}}16.0{{CompatNo}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support (on {{domxref("Element")}}){{CompatVersionUnknown}}{{CompatGeckoMobile("1.9.1")}}{{CompatVersionUnknown}}9.8{{CompatVersionUnknown}}
Support on {{domxref("CharacterData")}}{{CompatVersionUnknown}}{{CompatGeckoMobile("25")}}{{CompatNo}}16.0{{CompatNo}}
-
- -

 

- -

相关链接

- - - -

{{ languages( {"en": "en/DOM/element.nextElementSibling" } ) }}

diff --git a/files/zh-cn/web/api/nondocumenttypechildnode/previouselementsibling/index.html b/files/zh-cn/web/api/nondocumenttypechildnode/previouselementsibling/index.html deleted file mode 100644 index 8c78a68adf..0000000000 --- a/files/zh-cn/web/api/nondocumenttypechildnode/previouselementsibling/index.html +++ /dev/null @@ -1,118 +0,0 @@ ---- -title: NonDocumentTypeChildNode.previousElementSibling -slug: Web/API/NonDocumentTypeChildNode/previousElementSibling -translation_of: Web/API/NonDocumentTypeChildNode/previousElementSibling ---- -

{{ ApiRef() }}

- -

概述

- -

previousElementSibling 返回当前元素在其父元素的子元素节点中的前一个元素节点,如果该元素已经是第一个元素节点,则返回null,该属性是只读的.

- -

语法

- -
var prevNode = elementNodeReference.previousElementSibling;
-
- -

例子

- -
<div id="div-01">Here is div-01</div>
-<div id="div-02">Here is div-02</div>
-<li>This is a list item</li>
-<li>This is another list item</li>
-<div id="div-03">Here is div-03</div>
-
-<script type="text/javascript">
-  var el = document.getElementById('div-03').previousElementSibling;
-  document.write('<p>Siblings of div-03</p><ol>');
-  while (el) {
-    document.write('<li>' + el.nodeName + '</li>');
-    el = el.previousElementSibling;
-  }
-  document.write('</ol>');
-</script>
-
- -

上面的例子会输出以下内容:

- -
Siblings of div-03
-
-   1. LI
-   2. LI
-   3. DIV
-   4. DIV
-
- -

浏览器兼容性

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support4{{ CompatGeckoDesktop("1.9.1") }}99.84
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support (on {{domxref("Element")}}){{CompatVersionUnknown}}{{CompatGeckoMobile("1.9.1")}}{{CompatVersionUnknown}}9.8{{CompatVersionUnknown}}
Support on {{domxref("CharacterData")}}{{CompatVersionUnknown}}{{CompatGeckoMobile("25")}}{{CompatNo}}16.0{{CompatNo}}
-
- -

规范

- -

Element Traversal Specification: previousElementSibling

- -

相关链接

- - - -

{{ languages( {"en": "en/DOM/element.previousElementSibling" } ) }}

diff --git a/files/zh-tw/conflicting/web/api/element/index.html b/files/zh-tw/conflicting/web/api/element/index.html new file mode 100644 index 0000000000..31fb8c91e5 --- /dev/null +++ b/files/zh-tw/conflicting/web/api/element/index.html @@ -0,0 +1,125 @@ +--- +title: NonDocumentTypeChildNode +slug: Web/API/NonDocumentTypeChildNode +translation_of: Web/API/NonDocumentTypeChildNode +--- +
{{APIRef("DOM")}}
+ +

NonDocumentTypeChildNode 介面定義了可以擁有父節點但不適用 {{domxref("DocumentType")}} 之 {{domxref("Node")}} 物件的方法。

+ +

NonDocumentTypeChildNode 是一個原始的介面,且不能以此建立物件實體。{{domxref("Element")}} 及 {{domxref("CharacterData")}} 物件皆實作了 NonDocumentTypeChildNode

+ +

屬性

+ +

There is no inherited property.

+ +
+
{{domxref("NonDocumentTypeChildNode.previousElementSibling")}} {{readonlyInline}}
+
Returns the {{domxref("Element")}} immediately prior to this node in its parent's children list, or null if there is no {{domxref("Element")}} in the list prior to this node.
+
{{domxref("NonDocumentTypeChildNode.nextElementSibling")}} {{readonlyInline}}
+
Returns the {{domxref("Element")}} immediately following this node in its parent's children list, or null if there is no {{domxref("Element")}} in the list following this node.
+
+ +

方法

+ +

There is neither inherited, nor specific method.

+ +

規範

+ + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('DOM WHATWG', '#interface-childnode', 'NonDocumentTypeChildNode')}}{{Spec2('DOM WHATWG')}}Splitted the ElementTraversal interface in {{domxref("ParentNode")}}, {{domxref("ChildNode")}}, and NonDocumentTypeChildNode. The previousElementSibling and nextElementSibling are now defined on the latter.
+ The {{domxref("CharacterData")}} and {{domxref("Element")}} implemented the new interfaces.
{{SpecName('Element Traversal', '#interface-elementTraversal', 'ElementTraversal')}}{{Spec2('Element Traversal')}}Added the initial definition of its properties to the ElementTraversal pure interface and use it on {{domxref("Element")}}.
+ +

瀏覽器相容性

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support (on {{domxref("Element")}})1.0{{CompatGeckoDesktop("1.9.1")}}9.010.04.0
Support (on {{domxref("CharacterData")}})1.0{{CompatGeckoDesktop("25.0")}} [1]9.010.04.0
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support (on {{domxref("Element")}}){{ CompatVersionUnknown() }}{{CompatGeckoDesktop("1.9.1")}}{{ CompatVersionUnknown() }}10.0{{ CompatVersionUnknown() }}
Support (on {{domxref("CharacterData")}}){{ CompatVersionUnknown() }}{{CompatGeckoDesktop("25.0")}}{{ CompatVersionUnknown() }}10.0{{ CompatVersionUnknown() }}
+
+ +

[1] Firefox 25 also added the two properties defined here on {{domxref("DocumentType")}}, this was removed in Firefox 28 due to compatibility problems, and led to the creation of this new pure interface.

+ +

參見

+ + diff --git a/files/zh-tw/web/api/nondocumenttypechildnode/index.html b/files/zh-tw/web/api/nondocumenttypechildnode/index.html deleted file mode 100644 index 31fb8c91e5..0000000000 --- a/files/zh-tw/web/api/nondocumenttypechildnode/index.html +++ /dev/null @@ -1,125 +0,0 @@ ---- -title: NonDocumentTypeChildNode -slug: Web/API/NonDocumentTypeChildNode -translation_of: Web/API/NonDocumentTypeChildNode ---- -
{{APIRef("DOM")}}
- -

NonDocumentTypeChildNode 介面定義了可以擁有父節點但不適用 {{domxref("DocumentType")}} 之 {{domxref("Node")}} 物件的方法。

- -

NonDocumentTypeChildNode 是一個原始的介面,且不能以此建立物件實體。{{domxref("Element")}} 及 {{domxref("CharacterData")}} 物件皆實作了 NonDocumentTypeChildNode

- -

屬性

- -

There is no inherited property.

- -
-
{{domxref("NonDocumentTypeChildNode.previousElementSibling")}} {{readonlyInline}}
-
Returns the {{domxref("Element")}} immediately prior to this node in its parent's children list, or null if there is no {{domxref("Element")}} in the list prior to this node.
-
{{domxref("NonDocumentTypeChildNode.nextElementSibling")}} {{readonlyInline}}
-
Returns the {{domxref("Element")}} immediately following this node in its parent's children list, or null if there is no {{domxref("Element")}} in the list following this node.
-
- -

方法

- -

There is neither inherited, nor specific method.

- -

規範

- - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('DOM WHATWG', '#interface-childnode', 'NonDocumentTypeChildNode')}}{{Spec2('DOM WHATWG')}}Splitted the ElementTraversal interface in {{domxref("ParentNode")}}, {{domxref("ChildNode")}}, and NonDocumentTypeChildNode. The previousElementSibling and nextElementSibling are now defined on the latter.
- The {{domxref("CharacterData")}} and {{domxref("Element")}} implemented the new interfaces.
{{SpecName('Element Traversal', '#interface-elementTraversal', 'ElementTraversal')}}{{Spec2('Element Traversal')}}Added the initial definition of its properties to the ElementTraversal pure interface and use it on {{domxref("Element")}}.
- -

瀏覽器相容性

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support (on {{domxref("Element")}})1.0{{CompatGeckoDesktop("1.9.1")}}9.010.04.0
Support (on {{domxref("CharacterData")}})1.0{{CompatGeckoDesktop("25.0")}} [1]9.010.04.0
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support (on {{domxref("Element")}}){{ CompatVersionUnknown() }}{{CompatGeckoDesktop("1.9.1")}}{{ CompatVersionUnknown() }}10.0{{ CompatVersionUnknown() }}
Support (on {{domxref("CharacterData")}}){{ CompatVersionUnknown() }}{{CompatGeckoDesktop("25.0")}}{{ CompatVersionUnknown() }}10.0{{ CompatVersionUnknown() }}
-
- -

[1] Firefox 25 also added the two properties defined here on {{domxref("DocumentType")}}, this was removed in Firefox 28 due to compatibility problems, and led to the creation of this new pure interface.

- -

參見

- - -- cgit v1.2.3-54-g00ecf