Skip to content
Snippets Groups Projects
Select Git revision
  • a94a5b3eea135c01689adca13ac15d5d111980a9
  • master default protected
  • 1.31
  • 4.34.1
  • 4.34.0
  • 4.33.1
  • 4.33.0
  • 4.32.2
  • 4.32.1
  • 4.32.0
  • 4.31.0
  • 4.30.1
  • 4.30.0
  • 4.29.1
  • 4.29.0
  • 4.28.0
  • 4.27.0
  • 4.26.0
  • 4.25.5
  • 4.25.4
  • 4.25.3
  • 4.25.2
  • 4.25.1
23 results

state-button.mjs

Blame
  • customelement.mjs 25.44 KiB
    /**
     * Copyright schukai GmbH and contributors 2022. All Rights Reserved.
     * Node module: @schukai/monster
     * This file is licensed under the AGPLv3 License.
     * License text available at https://www.gnu.org/licenses/agpl-3.0.en.html
     */
    
    import { internalSymbol } from "../constants.mjs";
    import { extend } from "../data/extend.mjs";
    import { Pathfinder } from "../data/pathfinder.mjs";
    
    import { parseDataURL } from "../types/dataurl.mjs";
    import { getGlobalObject } from "../types/global.mjs";
    import { isArray, isFunction, isObject, isString } from "../types/is.mjs";
    import { Observer } from "../types/observer.mjs";
    import { ProxyObserver } from "../types/proxyobserver.mjs";
    import { validateFunction, validateInstance, validateObject, validateString } from "../types/validate.mjs";
    import { clone } from "../util/clone.mjs";
    import { addAttributeToken, getLinkedObjects, hasObjectLink } from "./attributes.mjs";
    import {
        ATTRIBUTE_DISABLED,
        ATTRIBUTE_ERRORMESSAGE,
        ATTRIBUTE_OPTIONS,
        ATTRIBUTE_OPTIONS_SELECTOR,
        customElementUpdaterLinkSymbol,
    } from "./constants.mjs";
    import { findDocumentTemplate, Template } from "./template.mjs";
    import { addObjectWithUpdaterToElement } from "./updater.mjs";
    import { instanceSymbol } from "../constants.mjs";
    
    export {
        CustomElement,
        initMethodSymbol,
        assembleMethodSymbol,
        attributeObserverSymbol,
        registerCustomElement,
        getSlottedElements,
    };
    
    /**
     * @memberOf Monster.DOM
     * @type {symbol}
     */
    const initMethodSymbol = Symbol.for("@schukai/monster/dom/@@initMethodSymbol");
    
    /**
     * @memberOf Monster.DOM
     * @type {symbol}
     */
    const assembleMethodSymbol = Symbol.for("@schukai/monster/dom/@@assembleMethodSymbol");
    
    /**
     * this symbol holds the attribute observer callbacks. The key is the attribute name.
     * @memberOf Monster.DOM
     * @type {symbol}
     */
    const attributeObserverSymbol = Symbol.for("@schukai/monster/dom/@@attributeObserver");
    
    /**
     * HTMLElement
     * @external HTMLElement
     * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement
     *
     * @startuml customelement-sequencediagram.png
     * skinparam monochrome true
     * skinparam shadowing false
     *
     * autonumber
     *
     * Script -> DOM: element = document.createElement('my-element')