src/Event/CustomEvent.php
/**
     * Initializes or reinitializes a CustomEvent.
     *
     * @see https://dom.spec.whatwg.org/#dom-customevent-initcustomevent
     *
     * @param string $type       The type of event to be created.
     * @param bool   $bubbles    (optional) Whether or not the event will bubble up the tree, if the
     *                           event is dispatched on an object that participates in a tree.
     *                           Defaults to false.
     * @param bool   $cancelable (optional) Whether or not the event's default action can be
     *                           prevented.  Defaults to false.
     * @param mixed  $detail     (optional) Additional data to be sent along with the event.
     */
Initializes or reinitializes a CustomEvent.

@param string $type       The type of event to be created.
@param bool   $bubbles    (optional) Whether or not the event will bubble up the tree, if the
event is dispatched on an object that participates in a tree.
Defaults to false.
@param bool   $cancelable (optional) Whether or not the event's default action can be
prevented.  Defaults to false.
@param mixed  $detail     (optional) Additional data to be sent along with the event.
Initializes or reinitializes a CustomEvent . @param string $type The type of event to be created . @param bool $bubbles ( optional ) Whether or not the event will bubble up the tree if the event is dispatched on an object that participates in a tree . Defaults to false . @param bool $cancelable ( optional ) Whether or not the event ' s default action can be prevented . Defaults to false . @param mixed $detail ( optional ) Additional data to be sent along with the event .
public function initCustomEvent(
        string $type,
        bool $bubbles = false,
        bool $cancelable = false,
        &$detail = null
    ): void {
        if ($this->flags & EventFlags::DISPATCH) {
            return;
        }
        $this->init($type, $bubbles, $cancelable);
        $this->detail = &$detail;
    }
public function initCustomEvent ( string $ type , bool $ bubbles = false , bool $ cancelable = false , & $ detail = null ) : void { if ( $ this -> flags & EventFlags :: DISPATCH ) { return ; } $ this -> init ( $ type , $ bubbles , $ cancelable ) ; $ this -> detail = & $ detail ; }
Initializes or reinitializes a CustomEvent.
Initializes or reinitializes a CustomEvent .