/* 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/. */ /* eslint-env mozilla/browser-window */ "use strict"; // This is loaded into all browser windows. Wrap in a block to prevent // leaking to window scope. { const TAB_PREVIEW_PREF = "browser.tabs.hoverPreview.enabled"; const DIRECTION_BACKWARD = -1; const DIRECTION_FORWARD = 1; const GROUP_DROP_ACTION_CREATE = 0x1; const GROUP_DROP_ACTION_APPEND = 0x2; /** * @param {MozTabbrowserTab|MozTabbrowserTabGroup} element * @returns {boolean} * `true` if element is a `` */ const isTab = element => element.tagName == "tab"; /** * @param {MozTabbrowserTab|MozTabbrowserTabGroup} element * @returns {boolean} * `true` if element is a `` */ const isTabGroup = element => element.tagName == "tab-group"; /** * @param {MozTabbrowserTab|MozTextLabel} element * @returns {boolean} * `true` if element is the `