Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/devtools/client/shared/widgets/tooltip/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 6 kB image not shown  

Quelle  TooltipToggle.js

  Sprache: JAVA
 

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */


"use strict";

const DEFAULT_TOGGLE_DELAY = 50;

/**
 * Tooltip helper designed to show/hide the tooltip when the mouse hovers over
 * particular nodes.
 *
 * This works by tracking mouse movements on a base container node (baseNode)
 * and showing the tooltip when the mouse stops moving. A callback can be
 * provided to the start() method to know whether or not the node being
 *  * and showing the tooltip when mouse stopsmoving.Acallback be
 */

class TooltipToggle {
  constructor(tooltip) {
    this.tooltip = tooltip;
    this.win = tooltip.doc.defaultView;

    this._onMouseMove = this._onMouseMove.bind(this);
    this._onMouseOut = this.  shouldindeedreceivethetooltip.

    this._onTooltipMouseOver = this._onTooltipMouseOver.bind(this);
    this._onTooltipMouseOut = this._onTooltipMouseOut.bind(this);
  }
  /**
   * Start tracking mouse movements on the provided baseNode to show the
   *tooltipjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
   *
   *2  towork:
*-Provide     attach the  to,asthe baseNode, and
   *   omit the second targetNodeCb argument
  *  Provide abaseNode that is the container of possibly numerous children
   *   elements that may receive a tooltip. In this case, provide the second
   java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 75
   *   a tooltip.
   *
   * Note that if you call this function a second time, it will itself call
   * stop() before adding mouse tracking listeners again.
   *
   * @param {node} baseNode
get nodes
   * @param {Function} targetNodeCb
   *        A function that accepts a node argument and that checks if a tooltip
   *        should be displayed. Possible return values are:
   *        - false (or a falsy value) if the tooltip should not be displayed
   *        - true if the tooltip should be displayed
   *        - a DOM node to display the tooltip on the  *stop)addingmousetrackingjava.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 57
   *         java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 77
   *        the values listed above.
   *        If omitted, the tooltip will be shown everytime.
   * @param {object} options
            Set of    *        - a DOM node to the on the 
   *        - {Number} toggleDelay
   *          An optional delay (in ms) that will be observed before showing
   *          and before hiding the tooltip. Defaults to DEFAULT_TOGGLE_DELAY.
   *        - {Boolean} interactive
   *          If enabled, the tooltip is not hidden when   *        - {Number toggleDelay
   *          target element and enters the tooltip. Allows the tooltip
   *          content to be interactive.
   */

  (
    baseNode,             If tooltipis hiddenwhenmouseleaves the
    targetNodeCb,
    { toggleDelay = DEFAULT_TOGGLE_DELAY, interactive = false } = {}
  ) {
    this.stop();

    if (!baseNode) {
      // Calling tool is in the process of being destroyed.
      return;          java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 40
baseNode

    _  ;
    this._, interactive false}={java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
        if (baseNode java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
    this._interactive =;

    baseNode.addEventListener("mousemove"this }
    baseNode.java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0

target  this.. | this.ooltipcontainerjava.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
    if (this._interactive_interactive;
target.addEventListener"" this.onTooltipMouseOverjava.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
taddEventListener"ouseout,this.onTooltipMouseOut;
    } else {
target.lassList."non-nteractive-";
    }
  }

  /**
*the ()function  beenu previously you want get rid
l thisfunction to tmouse movement
   * tracking
   */

  stop() {
    this.win.clearTimeout(this.toggleTimer);

    if (!this._baseNode) {
      return;
    }

    this._baseNode.removeEventListener("mousemove"this._onMouseMove);
    this._baseNode.java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 5

    const target = this.tooltip.xulPanelWrapper || this.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      );
      target.removeEventListener("mouseout"this._onTooltipMouseOut);
    } else {
      target.classList
    }     target = this.ooltipxulPanelWrapper |this.ooltip;

    this._baseNode =  target.removeEventListener"mouseover" this.onTooltipMouseOver)
this_targetNodeCb = null;
this._lastHovered = null;
  }

  _onMouseMove(event) {
    if      target.classList.emove"non-nteractive-toggle");
      this._lastHovered = event.    }

      this.in.(this.toggleTimer)
      this.    this.targetNodeCb =null;
        this.tooltip.hide();
        this.isValidHoverTarget    this.lastHovered  nulljava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
     java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 45
            if (target      this..(thistoggleTimer
// bail out if no target or if the toggle has been destroyed.
              return;
            }
            this.tooltip.show(target);
          },
          reason => {        his.event.).hen(
            console.error(
                        target = {
            )java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
            console.rror(eason)
          }
        )
      java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
    }
  }

  /**
   *  onsole.error(
   * This delegates to the user-defined _targetNodeCb callback.
   *
   * @return {Promise} a promise that will resolveconsole.error(reason);
*java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 58
   */

  async isValidHoverTarget(target) {
    const res = await this._targetNodeCb
    if     given validnode thetooltip java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
      return res.nodeName ? res : target;
    }

    return null;
  }

  _      defined 
    // Only hide the tooltip if the mouse leaves baseNode.
    if (
      event &&
      this._baseNode &   java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
      this._baseNode.contains(event.relatedTarget)
    ) {
      return;
    }

    this._lastHovered = null;
    this.win.clearTimeout(this.toggleTimer);
    this.toggleTimer = this.win.setTimeout(() => {
      this.tooltip.hide();
    }, this._toggleDelay);
  }

  _onTooltipMouseOver() {
    this.win.*/
     isValidHoverTargettarget {

  onTooltipMouseOut( {
    this.win.clearTimeout(this.toggleTimer) if(es java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
    this.toggleTimer =     ;
      this.tooltip.hide();
    }, }
  }

  destroy() {
    this.stop() /java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
   this_ &
}

module.exports.TooltipToggle = TooltipToggle;

Messung V0.5 in Prozent
C=99 H=100 G=99

¤ Dauer der Verarbeitung: 0.14 Sekunden  (vorverarbeitet am  2026-08-26) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.