Skip to content

Instantly share code, notes, and snippets.

/* eslint-disable func-style */
/* eslint-disable no-nested-ternary */
(function () {
'use strict';
if (!('submitter' in Event.prototype)) {
let submitterPrototype = window.Event.prototype;
if (!('SubmitEvent' in window && (submitterPrototype = window.SubmitEvent.prototype, !/Apple Computer/.test(navigator.vendor) || 'submitter' in submitterPrototype))) {
const submittersByForm = new WeakMap();
Object.defineProperty(submitterPrototype, 'submitter', {get() {
if (this.type === 'submit' && this.target instanceof HTMLFormElement) {
export class TimeInput extends HTMLInputElement
{
static is = 'time-input'
connectedCallback ()
{
this.addEventListener('input', this)
}
disconnectedCalback ()