public function addEventListener(
        $function,
        $event = null,
        $node = null,
        $wrap = false,
        $position = 1000
    ) {
        $event = $event ?: 'DOMContentLoaded';
        $node  = $node  ?: 'document';

        $function = ($wrap ? "function(event) { {$function} }" : $function);

        $this->addInline(
            "{$node}.addEventListener(\"{$event}\", {$function});",
            $position
        );
        return $this;
    }