Skip to content

Instantly share code, notes, and snippets.

View davidkern13's full-sized avatar

David Kern davidkern13

  • TelAviv
View GitHub Profile
// The events are from https://www.w3.org/TR/html5/semantics-embedded-content.html#media-elements-event-summary
import videojs from 'video.js'
const Plugin = videojs.getPlugin('plugin')
const EVENTS = [
'loadstart',
'progress',
'suspend',
'abort',
'error',
@davidkern13
davidkern13 / EventRegister.js
Last active October 23, 2023 17:09
EventRegister
class EventRegister {
static id = 0;
static events = Object.create(null);
}
const addEventListener = (name, handler) => {
ReactNativeEventRegister.id++;
let _id = EventRegister.id;
let _events = EventRegister.events;
let isValidName = checkName(name);
@davidkern13
davidkern13 / app.js
Created January 8, 2022 08:34 — forked from prof3ssorSt3v3/app.js
IndexedDB part 2 - transactions and requests
import { uid } from './uid.js';
console.log(uid());
//nothing else to import because we are using the built in methods
//https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase
const IDB = (function init() {
let db = null;
let objectStore = null;
let DBOpenReq = indexedDB.open('WhiskeyDB', 6);