From 5f21ba91efb4a9b6802801f216fba451cf701608 Mon Sep 17 00:00:00 2001 From: Florian Scholz Date: Tue, 16 Feb 2021 14:27:00 +0100 Subject: [PATCH 1/9] yarn content move Web/API/DocumentOrShadowRoot/activeElement Web/API/Document/activeElement --- files/en-us/_redirects.txt | 10 ++--- files/en-us/_wikihistory.json | 40 +++++++++---------- .../activeelement/index.html | 18 ++++----- 3 files changed, 34 insertions(+), 34 deletions(-) rename files/en-us/web/api/{documentorshadowroot => document}/activeelement/index.html (96%) diff --git a/files/en-us/_redirects.txt b/files/en-us/_redirects.txt index 7988a83b459b79c..0381998aaf9a491 100644 --- a/files/en-us/_redirects.txt +++ b/files/en-us/_redirects.txt @@ -1878,7 +1878,7 @@ /en-US/docs/DOM/dispatchEvent_example /en-US/docs/Web/Guide/Events/Creating_and_triggering_events /en-US/docs/DOM/document /en-US/docs/Web/API/Document /en-US/docs/DOM/document.URL /en-US/docs/Web/API/Document/URL -/en-US/docs/DOM/document.activeElement /en-US/docs/Web/API/DocumentOrShadowRoot/activeElement +/en-US/docs/DOM/document.activeElement /en-US/docs/Web/API/Document/activeElement /en-US/docs/DOM/document.addEventListener /en-US/docs/Web/API/EventTarget/addEventListener /en-US/docs/DOM/document.alinkColor /en-US/docs/Web/API/Document/alinkColor /en-US/docs/DOM/document.anchors /en-US/docs/Web/API/Document/anchors @@ -2419,7 +2419,7 @@ /en-US/docs/DOM:dispatchEvent_example /en-US/docs/Web/Guide/Events/Creating_and_triggering_events /en-US/docs/DOM:document /en-US/docs/Web/API/Document /en-US/docs/DOM:document.URL /en-US/docs/Web/API/Document/URL -/en-US/docs/DOM:document.activeElement /en-US/docs/Web/API/DocumentOrShadowRoot/activeElement +/en-US/docs/DOM:document.activeElement /en-US/docs/Web/API/Document/activeElement /en-US/docs/DOM:document.alinkColor /en-US/docs/Web/API/Document/alinkColor /en-US/docs/DOM:document.anchors /en-US/docs/Web/API/Document/anchors /en-US/docs/DOM:document.applets /en-US/docs/Web/API/Document/applets @@ -3250,7 +3250,7 @@ /en-US/docs/Document_Object_Model_(DOM)/cssMediaRule /en-US/docs/Web/API/CSSMediaRule /en-US/docs/Document_Object_Model_(DOM)/dispatchEvent_example /en-US/docs/Web/Guide/Events/Creating_and_triggering_events /en-US/docs/Document_Object_Model_(DOM)/document.URL /en-US/docs/Web/API/Document/URL -/en-US/docs/Document_Object_Model_(DOM)/document.activeElement /en-US/docs/Web/API/DocumentOrShadowRoot/activeElement +/en-US/docs/Document_Object_Model_(DOM)/document.activeElement /en-US/docs/Web/API/Document/activeElement /en-US/docs/Document_Object_Model_(DOM)/document.alinkColor /en-US/docs/Web/API/Document/alinkColor /en-US/docs/Document_Object_Model_(DOM)/document.anchors /en-US/docs/Web/API/Document/anchors /en-US/docs/Document_Object_Model_(DOM)/document.applets /en-US/docs/Web/API/Document/applets @@ -7509,7 +7509,6 @@ /en-US/docs/Web/API/Document/Document:_DOMContentLoaded_event /en-US/docs/Web/API/Document/DOMContentLoaded_event /en-US/docs/Web/API/Document/Document:_paste_event /en-US/docs/Web/API/Document/paste_event /en-US/docs/Web/API/Document/ParentNode.querySelectorAll /en-US/docs/Web/API/ParentNode/querySelectorAll -/en-US/docs/Web/API/Document/activeElement /en-US/docs/Web/API/DocumentOrShadowRoot/activeElement /en-US/docs/Web/API/Document/async /en-US/docs/Web/API/XMLDocument/async /en-US/docs/Web/API/Document/baseURI /en-US/docs/Web/API/Node/baseURI /en-US/docs/Web/API/Document/cancelFullscreen /en-US/docs/Web/API/Document/exitFullscreen @@ -7567,6 +7566,7 @@ /en-US/docs/Web/API/DocumentFragment/children /en-US/docs/Web/API/ParentNode/children /en-US/docs/Web/API/DocumentFragment/firstElementChild /en-US/docs/Web/API/ParentNode/firstElementChild /en-US/docs/Web/API/DocumentFragment/lastElementChild /en-US/docs/Web/API/ParentNode/lastElementChild +/en-US/docs/Web/API/DocumentOrShadowRoot/activeElement /en-US/docs/Web/API/Document/activeElement /en-US/docs/Web/API/DocumentOrShadowRoot/nodeFromPoint /en-US/docs/Web/API/DocumentOrShadowRoot /en-US/docs/Web/API/DocumentOrShadowRoot/nodesFromPoint /en-US/docs/Web/API/DocumentOrShadowRoot /en-US/docs/Web/API/DocumentOrShadowRoot/pictureInPictureEnabled /en-US/docs/Web/API/DocumentOrShadowRoot/pictureInPictureElement @@ -9249,7 +9249,7 @@ /en-US/docs/Web/API/console.trace /en-US/docs/Web/API/Console/trace /en-US/docs/Web/API/console.warn /en-US/docs/Web/API/Console/warn /en-US/docs/Web/API/document.URL /en-US/docs/Web/API/Document/URL -/en-US/docs/Web/API/document.activeElement /en-US/docs/Web/API/DocumentOrShadowRoot/activeElement +/en-US/docs/Web/API/document.activeElement /en-US/docs/Web/API/Document/activeElement /en-US/docs/Web/API/document.adoptNode /en-US/docs/Web/API/Document/adoptNode /en-US/docs/Web/API/document.alinkColor /en-US/docs/Web/API/Document/alinkColor /en-US/docs/Web/API/document.anchors /en-US/docs/Web/API/Document/anchors diff --git a/files/en-us/_wikihistory.json b/files/en-us/_wikihistory.json index 37cd708fe1505da..7698bd1f706f00f 100644 --- a/files/en-us/_wikihistory.json +++ b/files/en-us/_wikihistory.json @@ -44326,25 +44326,6 @@ "david_ross" ] }, - "Web/API/DocumentOrShadowRoot/activeElement": { - "modified": "2020-10-15T21:49:26.859Z", - "contributors": [ - "alattalatta", - "mfluehr", - "sideshowbarker", - "krosylight", - "Konrud", - "chrisdavidmills", - "spencer523", - "Sheppy", - "Volker-E", - "jpmedley", - "u_7cc", - "fscholz", - "bede", - "david_ross" - ] - }, "Web/API/DocumentOrShadowRoot/caretPositionFromPoint": { "modified": "2020-10-15T21:49:27.908Z", "contributors": [ @@ -165885,5 +165866,24 @@ "contributors": [ "sideshowbarker" ] + }, + "Web/API/Document/activeElement": { + "modified": "2020-10-15T21:49:26.859Z", + "contributors": [ + "alattalatta", + "mfluehr", + "sideshowbarker", + "krosylight", + "Konrud", + "chrisdavidmills", + "spencer523", + "Sheppy", + "Volker-E", + "jpmedley", + "u_7cc", + "fscholz", + "bede", + "david_ross" + ] } -} +} \ No newline at end of file diff --git a/files/en-us/web/api/documentorshadowroot/activeelement/index.html b/files/en-us/web/api/document/activeelement/index.html similarity index 96% rename from files/en-us/web/api/documentorshadowroot/activeelement/index.html rename to files/en-us/web/api/document/activeelement/index.html index c0cf1fc9aab354d..0058a5a59bee148 100644 --- a/files/en-us/web/api/documentorshadowroot/activeelement/index.html +++ b/files/en-us/web/api/document/activeelement/index.html @@ -1,15 +1,15 @@ --- title: DocumentOrShadowRoot.activeElement -slug: Web/API/DocumentOrShadowRoot/activeElement +slug: Web/API/Document/activeElement tags: -- API -- Document -- DocumentOrShadowRoot -- Focus -- Property -- Reference -- ShadowRoot -- activeElement + - API + - Document + - DocumentOrShadowRoot + - Focus + - Property + - Reference + - ShadowRoot + - activeElement ---
{{APIRef("Shadow DOM")}}
From 86362724f5415787082c020adf760b923919c63a Mon Sep 17 00:00:00 2001 From: Florian Scholz Date: Tue, 16 Feb 2021 14:34:35 +0100 Subject: [PATCH 2/9] Update document.activeElement --- .../en-us/web/api/document/activeelement/index.html | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/files/en-us/web/api/document/activeelement/index.html b/files/en-us/web/api/document/activeelement/index.html index 0058a5a59bee148..9ce429d3845bc56 100644 --- a/files/en-us/web/api/document/activeelement/index.html +++ b/files/en-us/web/api/document/activeelement/index.html @@ -1,10 +1,9 @@ --- -title: DocumentOrShadowRoot.activeElement +title: Document.activeElement slug: Web/API/Document/activeElement tags: - API - Document - - DocumentOrShadowRoot - Focus - Property - Reference @@ -13,10 +12,8 @@ ---
{{APIRef("Shadow DOM")}}
-

The activeElement read-only - property of the {{domxref("Document")}} and {{domxref("ShadowRoot")}} interfaces - returns the {{domxref("Element")}} within the DOM or shadow DOM tree that currently - has focus.

+

The activeElement read-only property +of the {{domxref("Document")}} returns the {{domxref("Element")}} within the DOM that currently has focus.

Often activeElement will return a {{domxref("HTMLInputElement")}} or {{domxref("HTMLTextAreaElement")}} object if it has the text selection at the time. If @@ -41,7 +38,7 @@

Syntax

element = DocumentOrShadowRoot.activeElement
+ class="brush: js notranslate">element = document.activeElement

Value

@@ -105,4 +102,4 @@

Specifications

Browser compatibility

-

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

+

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

From a1659dd565807bd4046dc1c5fbee244961e00ce8 Mon Sep 17 00:00:00 2001 From: Florian Scholz Date: Tue, 16 Feb 2021 14:40:41 +0100 Subject: [PATCH 3/9] Update document interface page --- files/en-us/web/api/document/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/en-us/web/api/document/index.html b/files/en-us/web/api/document/index.html index 34e4842894c2f97..6b7f8bea6605343 100644 --- a/files/en-us/web/api/document/index.html +++ b/files/en-us/web/api/document/index.html @@ -28,6 +28,8 @@

Properties

This interface also inherits from the {{DOMxRef("Node")}} and {{DOMxRef("EventTarget")}} interfaces.

+
{{DOMxRef("Document.activeElement")}} {{ReadOnlyInline}}
+
Returns the {{DOMxRef('Element')}} that currently has focus.
{{DOMxRef("Document.body")}}
Returns the {{HTMLElement("body")}} or {{htmlelement("frameset")}} node of the current document.
{{DOMxRef("Document.characterSet")}}{{ReadOnlyInline}}
@@ -116,8 +118,6 @@

Properties included from

The Document interface includes the following properties defined on the {{DOMxRef("DocumentOrShadowRoot")}} mixin. Note that this is currently only implemented by Chrome; other browsers still implement them directly on the {{DOMxRef("Document")}} interface.

-
{{DOMxRef("DocumentOrShadowRoot.activeElement")}}{{ReadOnlyInline}}
-
Returns the {{DOMxRef('Element')}} within the shadow tree that has focus.
{{DOMxRef("Document.fullscreenElement")}}{{ReadOnlyInline}}
The element that's currently in full screen mode for this document.
{{DOMxRef("DocumentOrShadowRoot.pointerLockElement")}} {{Experimental_Inline}}{{ReadOnlyInline}}
From a55b405f8ae347442a2b5cad610f54bfddd1174a Mon Sep 17 00:00:00 2001 From: Florian Scholz Date: Tue, 16 Feb 2021 14:41:18 +0100 Subject: [PATCH 4/9] Update link to activeElement from css page --- files/en-us/web/css/_colon_-moz-window-inactive/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/css/_colon_-moz-window-inactive/index.html b/files/en-us/web/css/_colon_-moz-window-inactive/index.html index 31f191053cb4a88..aa06699121f5d8a 100644 --- a/files/en-us/web/css/_colon_-moz-window-inactive/index.html +++ b/files/en-us/web/css/_colon_-moz-window-inactive/index.html @@ -66,5 +66,5 @@

See also

  • :active
  • -
  • The {{domxref("DocumentOrShadowRoot.activeElement", "activeElement")}} property on documents and shadow DOM roots
  • +
  • The {{domxref("Document.activeElement")}} property and {{domxref("ShadowRoot.activeElement")}} for shadow DOM roots
  • From d76f6b5fe65d70cffed01b48d343921606947fea Mon Sep 17 00:00:00 2001 From: Florian Scholz Date: Tue, 16 Feb 2021 14:47:29 +0100 Subject: [PATCH 5/9] Update ShadowRoot interface page --- files/en-us/web/api/shadowroot/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/en-us/web/api/shadowroot/index.html b/files/en-us/web/api/shadowroot/index.html index 128b090f0fc0f60..12826eb163eec86 100644 --- a/files/en-us/web/api/shadowroot/index.html +++ b/files/en-us/web/api/shadowroot/index.html @@ -18,6 +18,8 @@

    Properties

    +
    {{domxref("ShadowRoot.activeElement")}} {{readonlyInline}}
    +
    Returns the {{domxref('Element')}} within the shadow tree that has focus.
    {{domxref("ShadowRoot.delegatesFocus")}} {{readonlyinline}} {{non-standard_inline}}
    Returns a boolean that indicates whether delegatesFocus was set when the shadow was attached (see {{domxref("Element.attachShadow()")}}).
    {{domxref("ShadowRoot.host")}} {{readonlyinline}}
    @@ -33,8 +35,6 @@

    Properties included from

    The ShadowRoot interface includes the following properties defined on the {{domxref("DocumentOrShadowRoot")}} mixin. Note that this is currently only implemented by Chrome; other browsers still implement them on the {{domxref("Document")}} interface.

    -
    {{domxref("DocumentOrShadowRoot.activeElement")}} {{readonlyInline}}
    -
    Returns the {{domxref('Element')}} within the shadow tree that has focus.
    {{domxref("DocumentOrShadowRoot.styleSheets")}} {{readonlyInline}}
    Returns a {{domxref('StyleSheetList')}} of {{domxref('CSSStyleSheet')}} objects for stylesheets explicitly linked into, or embedded in a document.
    From c2aa126bc13455610b629b5f91275835f5d4aba5 Mon Sep 17 00:00:00 2001 From: Florian Scholz Date: Tue, 16 Feb 2021 14:56:06 +0100 Subject: [PATCH 6/9] Add new page for ShadowRoot.activeElement --- .../api/shadowroot/activeElement/index.html | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 files/en-us/web/api/shadowroot/activeElement/index.html diff --git a/files/en-us/web/api/shadowroot/activeElement/index.html b/files/en-us/web/api/shadowroot/activeElement/index.html new file mode 100644 index 000000000000000..70ef192e6146058 --- /dev/null +++ b/files/en-us/web/api/shadowroot/activeElement/index.html @@ -0,0 +1,54 @@ +--- +title: ShadowRoot.activeElement +slug: Web/API/ShadowRoot/activeElement +tags: +- API +- Property +- Reference +- ShadowRoot +- Web Components +- shadow dom +--- +
    {{APIRef("Shadow DOM")}}
    + +

    The activeElement read-only property of the +{{domxref("ShadowRoot")}} interface returns the element within the shadow tree that has focus.

    + +

    Syntax

    + +
    shadowRoot.activeElement
    + +

    Value

    + +

    The {{domxref('Element')}} which currently has focus, or null if there is no focused element.

    + +

    Examples

    + +
    let customElem = document.querySelector('my-shadow-dom-element');
    +let shadow = customElem.shadowRoot;
    +let focusedElem = shadow.activeElement;
    + +

    Specifications

    + + + + + + + + + + + + +
    Specification
    {{SpecName('HTML WHATWG','#dom-documentorshadowroot-activeelement', 'activeElement')}}
    + +

    Browser compatibility

    + +

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

    + +

    See also

    + +
      +
    • {{domxref("Document.activeElement")}}
    • +
    From 34a3e289ff2418d3edc60f2a9fe2a2465325bf27 Mon Sep 17 00:00:00 2001 From: Florian Scholz Date: Tue, 16 Feb 2021 15:07:58 +0100 Subject: [PATCH 7/9] fix case of dir --- .../api/shadowroot/{activeElement => activeelement}/index.html | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename files/en-us/web/api/shadowroot/{activeElement => activeelement}/index.html (100%) diff --git a/files/en-us/web/api/shadowroot/activeElement/index.html b/files/en-us/web/api/shadowroot/activeelement/index.html similarity index 100% rename from files/en-us/web/api/shadowroot/activeElement/index.html rename to files/en-us/web/api/shadowroot/activeelement/index.html From 1d84f0f414c37d19ab9f0e1e8e9f9ab879b63006 Mon Sep 17 00:00:00 2001 From: Chris Mills Date: Tue, 16 Feb 2021 15:23:08 +0000 Subject: [PATCH 8/9] copy edit --- files/en-us/web/css/_colon_-moz-window-inactive/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/css/_colon_-moz-window-inactive/index.html b/files/en-us/web/css/_colon_-moz-window-inactive/index.html index aa06699121f5d8a..0342703fa565ca2 100644 --- a/files/en-us/web/css/_colon_-moz-window-inactive/index.html +++ b/files/en-us/web/css/_colon_-moz-window-inactive/index.html @@ -66,5 +66,5 @@

    See also

  • :active
  • -
  • The {{domxref("Document.activeElement")}} property and {{domxref("ShadowRoot.activeElement")}} for shadow DOM roots
  • +
  • The {{domxref("Document.activeElement")}} property for regular DOM, and the {{domxref("ShadowRoot.activeElement")}} property for shadow DOM roots.
  • From 766dfe804b66ad7b3e712cedf0582bd8f77d2508 Mon Sep 17 00:00:00 2001 From: Chris Mills Date: Tue, 16 Feb 2021 15:24:00 +0000 Subject: [PATCH 9/9] copy edit --- files/en-us/web/api/document/activeelement/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/api/document/activeelement/index.html b/files/en-us/web/api/document/activeelement/index.html index 9ce429d3845bc56..0be5d65af804103 100644 --- a/files/en-us/web/api/document/activeelement/index.html +++ b/files/en-us/web/api/document/activeelement/index.html @@ -13,7 +13,7 @@
    {{APIRef("Shadow DOM")}}

    The activeElement read-only property -of the {{domxref("Document")}} returns the {{domxref("Element")}} within the DOM that currently has focus.

    +of the {{domxref("Document")}} interface returns the {{domxref("Element")}} within the DOM that currently has focus.

    Often activeElement will return a {{domxref("HTMLInputElement")}} or {{domxref("HTMLTextAreaElement")}} object if it has the text selection at the time. If