@exadel/esl
Version:
Exadel Smart Library (ESL) is the lightweight custom elements library that provide a set of super-flexible components
13 lines (12 loc) • 395 B
JavaScript
/** A custom event dispatched by {@link ESLMediaQuery} instances */
export class ESLMediaChangeEvent extends Event {
constructor(matches) {
super(ESLMediaChangeEvent.TYPE);
this.matches = matches;
}
/** Returns serialized value of the current {@link ESLMediaQuery} */
get media() {
return String(this.target);
}
}
ESLMediaChangeEvent.TYPE = 'change';