diff --git a/files/en-us/_redirects.txt b/files/en-us/_redirects.txt index 852e7f8287d309f..303577eef0e7095 100644 --- a/files/en-us/_redirects.txt +++ b/files/en-us/_redirects.txt @@ -1887,7 +1887,7 @@ /en-US/docs/DOM/document.baseURIObject /en-US/docs/Web/API/Node /en-US/docs/DOM/document.bgColor /en-US/docs/Web/API/Document/bgColor /en-US/docs/DOM/document.body /en-US/docs/Web/API/Document/body -/en-US/docs/DOM/document.caretPositionFromPoint /en-US/docs/Web/API/DocumentOrShadowRoot/caretPositionFromPoint +/en-US/docs/DOM/document.caretPositionFromPoint /en-US/docs/Web/API/Document/caretPositionFromPoint /en-US/docs/DOM/document.characterSet /en-US/docs/Web/API/document/characterSet /en-US/docs/DOM/document.clear /en-US/docs/Web/API/Document/clear /en-US/docs/DOM/document.close /en-US/docs/Web/API/Document/close @@ -7555,6 +7555,7 @@ /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/caretPositionFromPoint /en-US/docs/Web/API/Document/caretPositionFromPoint /en-US/docs/Web/API/DocumentOrShadowRoot/fullscreenElement /en-US/docs/Web/API/Document/fullscreenElement /en-US/docs/Web/API/DocumentOrShadowRoot/getAnimations /en-US/docs/Web/API/Document/getAnimations /en-US/docs/Web/API/DocumentOrShadowRoot/getSelection /en-US/docs/Web/API/Document/getSelection @@ -9263,7 +9264,7 @@ /en-US/docs/Web/API/document.async /en-US/docs/Web/API/XMLDocument/async /en-US/docs/Web/API/document.bgColor /en-US/docs/Web/API/Document/bgColor /en-US/docs/Web/API/document.body /en-US/docs/Web/API/Document/body -/en-US/docs/Web/API/document.caretPositionFromPoint /en-US/docs/Web/API/DocumentOrShadowRoot/caretPositionFromPoint +/en-US/docs/Web/API/document.caretPositionFromPoint /en-US/docs/Web/API/Document/caretPositionFromPoint /en-US/docs/Web/API/document.characterSet /en-US/docs/Web/API/document/characterSet /en-US/docs/Web/API/document.clear /en-US/docs/Web/API/Document/clear /en-US/docs/Web/API/document.close /en-US/docs/Web/API/Document/close @@ -9353,7 +9354,6 @@ /en-US/docs/Web/API/document.write /en-US/docs/Web/API/Document/write /en-US/docs/Web/API/document.writeln /en-US/docs/Web/API/Document/writeln /en-US/docs/Web/API/document.xmlVersion /en-US/docs/Web/API/Document/xmlVersion -/en-US/docs/Web/API/document/caretPositionFromPoint /en-US/docs/Web/API/DocumentOrShadowRoot/caretPositionFromPoint /en-US/docs/Web/API/document/mozFullScreen /en-US/docs/Web/API/Document/fullscreen /en-US/docs/Web/API/document/nodePrincipal /en-US/docs/Web/API/Node /en-US/docs/Web/API/dummyDocument.scripts /en-US/docs/Web/API/Document/scripts @@ -11898,7 +11898,7 @@ /en-US/docs/cancelBubble /en-US/docs/Web/API/UIEvent/cancelBubble /en-US/docs/cancelable /en-US/docs/Web/API/Event/cancelable /en-US/docs/caption /en-US/docs/Web/HTML/Element/caption -/en-US/docs/caret_temp /en-US/docs/Web/API/DocumentOrShadowRoot/caretPositionFromPoint +/en-US/docs/caret_temp /en-US/docs/Web/API/Document/caretPositionFromPoint /en-US/docs/ccache /en-US/docs/Mozilla/Developer_guide/Build_Instructions/ccache /en-US/docs/ccs_temp /en-US/docs/Web/API/Document/createCDATASection /en-US/docs/cellPadding /en-US/docs/Web/API/HTMLTableElement/cellPadding diff --git a/files/en-us/_wikihistory.json b/files/en-us/_wikihistory.json index b20ad9bf66ba63d..4599e516f2ae624 100644 --- a/files/en-us/_wikihistory.json +++ b/files/en-us/_wikihistory.json @@ -44289,17 +44289,6 @@ "david_ross" ] }, - "Web/API/DocumentOrShadowRoot/caretPositionFromPoint": { - "modified": "2020-10-15T21:49:27.908Z", - "contributors": [ - "mfluehr", - "myakura", - "fscholz", - "chrisdavidmills", - "david_ross", - "jpmedley" - ] - }, "Web/API/DocumentOrShadowRoot/elementFromPoint": { "modified": "2020-10-15T21:49:27.541Z", "contributors": [ @@ -165787,5 +165776,16 @@ "bede", "david_ross" ] + }, + "Web/API/Document/caretPositionFromPoint": { + "modified": "2020-10-15T21:49:27.908Z", + "contributors": [ + "mfluehr", + "myakura", + "fscholz", + "chrisdavidmills", + "david_ross", + "jpmedley" + ] } } \ No newline at end of file diff --git a/files/en-us/mozilla/firefox/releases/20/index.html b/files/en-us/mozilla/firefox/releases/20/index.html index 2d23f470a1ddef2..74779ebc1b54f64 100644 --- a/files/en-us/mozilla/firefox/releases/20/index.html +++ b/files/en-us/mozilla/firefox/releases/20/index.html @@ -49,7 +49,7 @@

DOM/APIs

  • {{domxref("TextDecoder")}} and {{domxref("TextEncoder")}} interfaces are now available in Workers ({{bug('795542')}}).
  • Support for the CSS.supports() method has been added, behind the layout.css.supports-rule.enabled pref (off by default) ({{bug("779917")}}).
  • Support for UndoManager has been added ({{bug("617532")}}).
  • -
  • The CSSOM {{domxref("DocumentOrShadowRoot/caretPositionFromPoint")}} method, which returns a {{domxref("CaretPosition")}} has been implemented.
  • +
  • The CSSOM {{domxref("Document.caretPositionFromPoint()")}} method, which returns a {{domxref("CaretPosition")}} has been implemented.
  • The index argument of the {{domxref("tableRow.insertCell")}} and {{domxref("table.insertRow")}} methods has been made optional as per HTML specification.
  • {{domxref("Navigator.getUserMedia")}}, still prefixed as Navigator.mozGetUserMedia is now activated by default.
  • The third, optional, transfer argument of {{domxref("Window.postMessage")}} is now supported. It allows to transfer a sequence of {{domxref("Transferable")}} objects to the destination ({{bug("822094")}}).
  • diff --git a/files/en-us/web/api/caretposition/index.html b/files/en-us/web/api/caretposition/index.html index 5e2daeeb3222288..8a0a8beef5711c2 100644 --- a/files/en-us/web/api/caretposition/index.html +++ b/files/en-us/web/api/caretposition/index.html @@ -10,7 +10,7 @@ ---

    {{SeeCompatTable}} {{ APIRef("CSSOM") }}

    -

    The CaretPosition interface represents the caret position, an indicator for the text insertion point. You can get a CaretPosition using the {{domxref("DocumentOrShadowRoot/caretPositionFromPoint", "document.caretPositionFromPoint()")}} method.

    +

    The CaretPosition interface represents the caret position, an indicator for the text insertion point. You can get a CaretPosition using the {{domxref("Document.caretPositionFromPoint()")}} method.

    Properties

    @@ -60,7 +60,7 @@

    Browser compatibility

    See also

    diff --git a/files/en-us/web/api/documentorshadowroot/caretpositionfrompoint/index.html b/files/en-us/web/api/document/caretpositionfrompoint/index.html similarity index 79% rename from files/en-us/web/api/documentorshadowroot/caretpositionfrompoint/index.html rename to files/en-us/web/api/document/caretpositionfrompoint/index.html index e229733d3fc88e7..7b299314b619639 100644 --- a/files/en-us/web/api/documentorshadowroot/caretpositionfrompoint/index.html +++ b/files/en-us/web/api/document/caretpositionfrompoint/index.html @@ -1,26 +1,23 @@ --- -title: DocumentOrShadowRoot.caretPositionFromPoint() -slug: Web/API/DocumentOrShadowRoot/caretPositionFromPoint +title: Document.caretPositionFromPoint() +slug: Web/API/Document/caretPositionFromPoint tags: -- API -- Document -- DocumentOrShadowRoot -- Method -- Reference -- ShadowRoot -- caretPositionFromPoint() + - API + - Document + - Method + - Reference --- -

    {{APIRef("CSSOM View")}}{{SeeCompatTable}}

    +

    {{APIRef("CSSOM View")}} {{SeeCompatTable}}

    The caretPositionFromPoint() - property of the {{domxref("DocumentOrShadowRoot")}} interface returns a + property of the {{domxref("Document")}} interface returns a {{domxref('CaretPosition')}} object, containing the DOM node, along with the caret and caret's character offset within that node.

    Syntax

    var caretPosition = document.caretPositionFromPoint(float x, float y);
    + class="brush: js">caretPositionFromPoint(x, y);

    Parameters

    @@ -90,17 +87,20 @@

    Specifications

    Specification - Status - Comment {{SpecName('CSSOM View','#dom-document-caretpositionfrompoint','caretPositionFromPoint()')}} - {{Spec2('CSSOM View')}} - Initial definition.

    Browser compatibility

    -

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

    +

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

    + + +

    See also

    + + diff --git a/files/en-us/web/api/document/index.html b/files/en-us/web/api/document/index.html index c72d65137bf1b46..aeb4ef37cf83700 100644 --- a/files/en-us/web/api/document/index.html +++ b/files/en-us/web/api/document/index.html @@ -208,6 +208,8 @@

    Methods

    Adopt node from an external document.
    {{DOMxRef("Document.captureEvents()")}} {{Deprecated_Inline}}
    See {{DOMxRef("Window.captureEvents")}}.
    +
    {{DOMxRef("Document.caretPositionFromPoint()")}}
    +
    Returns a {{DOMxRef('CaretPosition')}} object containing the DOM node containing the caret, and caret's character offset within that node.
    {{DOMxRef("Document.caretRangeFromPoint()")}} {{Non-standard_Inline}}
    Gets a {{DOMxRef("Range")}} object for the document fragment under the specified coordinates.
    {{DOMxRef("Document.createAttribute()")}}
    @@ -336,8 +338,6 @@

    Methods included from Docume

    The Document interface includes the following methods 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.caretPositionFromPoint()")}}
    -
    Returns a {{DOMxRef('CaretPosition')}} object containing the DOM node containing the caret, and caret's character offset within that node.
    {{DOMxRef("DocumentOrShadowRoot.elementFromPoint()")}}
    Returns the topmost element at the specified coordinates.
    {{DOMxRef("DocumentOrShadowRoot.elementsFromPoint()")}}
    diff --git a/files/en-us/web/api/documentorshadowroot/elementfrompoint/index.html b/files/en-us/web/api/documentorshadowroot/elementfrompoint/index.html index bb4f2258063564a..cf564d817299887 100644 --- a/files/en-us/web/api/documentorshadowroot/elementfrompoint/index.html +++ b/files/en-us/web/api/documentorshadowroot/elementfrompoint/index.html @@ -40,7 +40,7 @@ coordinate is negative, the result is null.

    If you need to find the specific position inside the element, use - {{domxref("DocumentOrShadowRoot.caretPositionFromPoint")}}.

    + {{domxref("Document.caretPositionFromPoint()")}}.

    Syntax

    diff --git a/files/en-us/web/api/shadowroot/index.html b/files/en-us/web/api/shadowroot/index.html index 9a14ab70a112aa0..4eb0d0ca1b69e44 100644 --- a/files/en-us/web/api/shadowroot/index.html +++ b/files/en-us/web/api/shadowroot/index.html @@ -49,8 +49,6 @@

    Methods

    Returns the topmost element at the specified coordinates.
    {{domxref("ShadowRoot.elementsFromPoint()")}}
    Returns an array of all elements at the specified coordinates.
    -
    {{domxref("ShadowRoot.caretPositionFromPoint()")}}
    -
    Returns a {{domxref('CaretPosition')}} object containing the DOM node containing the caret, and caret's character offset within that node.

    Examples