feature: client: dom: events: migrate to ESM

This commit is contained in:
coderiaser 2026-02-03 14:19:16 +02:00
parent 071141bc5a
commit e8a81c49ea
4 changed files with 18 additions and 22 deletions

View file

@ -1,17 +0,0 @@
'use strict';
let list = [];
module.exports.add = (el, name, fn) => {
list.push([
el,
name,
fn,
]);
};
module.exports.clear = () => {
list = [];
};
module.exports.get = () => list;

View file

@ -0,0 +1,15 @@
let list = [];
export const add = (el, name, fn) => {
list.push([
el,
name,
fn,
]);
};
export const clear = () => {
list = [];
};
export const get = () => list;

View file

@ -1,7 +1,5 @@
'use strict';
const {test} = require('supertape');
const eventStore = require('./event-store');
import {test} from 'supertape';
import * as eventStore from './event-store.mjs';
test('event-store: get', (t) => {
const el = {};

View file

@ -1,5 +1,5 @@
import itype from 'itype';
import EventStore from './event-store.js';
import * as EventStore from './event-store.mjs';
/**
* safe add event listener