weasel API - v0.8.0
    Preparing search index...

    Function specificity

    • CSS-style specificity tuple for a GestureSpec. Higher tuple wins under lexicographic compare. Dimensions, in order of precedence:

      [0] target — how much the spec's target narrows; see targetRank. [1] mods — count of required modifier keys (shift/alt/ctrl/meta/mod). 'optional' does NOT count. [2] phase — 1 if the spec declares a phase field, else 0. [3] exact — per-kind tiebreak: 2 for a drop/paste spec with a non-empty types MIME filter, else 1.

      Identical tuples fall back to registration order in the matcher's stable sort, preserving the pre-specificity tiebreaker.

      Parameters

      Returns readonly [number, number, number, number]