Bug 1409031 - Fix element.isInView markup. r?whimboo draft
authorAndreas Tolfsen <ato@sny.no>
Mon, 16 Oct 2017 15:30:23 +0100
changeset 680892 afc40fa7dbbf6fe1bed4fab9221e78ba709990f3
parent 680891 9d6baa0a52d8ad1d18e8ac72f7000fce26f51533
child 680893 552c6e670a905debef773e70b270abb3c37cad7b
push id84664
push userbmo:ato@sny.no
push dateMon, 16 Oct 2017 14:31:31 +0000
reviewerswhimboo
bugs1409031
milestone58.0a1
Bug 1409031 - Fix element.isInView markup. r?whimboo MozReview-Commit-ID: LYe8XbGufIe
testing/marionette/element.js
--- a/testing/marionette/element.js
+++ b/testing/marionette/element.js
@@ -850,29 +850,30 @@ element.getContainer = function(el) {
 };
 
 /**
  * An element is in view if it is a member of its own pointer-interactable
  * paint tree.
  *
  * This means an element is considered to be in view, but not necessarily
  * pointer-interactable, if it is found somewhere in the
- * |elementsFromPoint| list at |el|'s in-view centre coordinates.
+ * <code>elementsFromPoint</code> list at <var>el</var>'s in-view
+ * centre coordinates.
  *
- * Before running the check, we change |el|'s pointerEvents style property
- * to "auto", since elements without pointer events enabled do not turn
- * up in the paint tree we get from document.elementsFromPoint.  This is
- * a specialisation that is only relevant when checking if the element is
- * in view.
+ * Before running the check, we change <var>el</var>'s pointerEvents
+ * style property to "auto", since elements without pointer events
+ * enabled do not turn up in the paint tree we get from
+ * document.elementsFromPoint.  This is a specialisation that is only
+ * relevant when checking if the element is in view.
  *
  * @param {Element} el
  *     Element to check if is in view.
  *
  * @return {boolean}
- *     True if |el| is inside the viewport, or false otherwise.
+ *     True if <var>el</var> is inside the viewport, or false otherwise.
  */
 element.isInView = function(el) {
   let originalPointerEvents = el.style.pointerEvents;
   try {
     el.style.pointerEvents = "auto";
     const tree = element.getPointerInteractablePaintTree(el);
     return tree.includes(el);
   } finally {