happy-dom
Version:
Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. It includes many web standards from WHATWG DOM and HTML.
42 lines • 917 B
JavaScript
/**
* CSS module.
*/
export default class CSSModule {
url;
/**
* Constructor.
*
* @param init Initialization options.
*/
constructor(init) {
this.
this.url = init.url;
this.
}
/**
* Compiles and evaluates the module.
*
* @returns Module exports.
*/
async evaluate() {
if (this.
return this.
}
const styleSheet = new this.
styleSheet.replaceSync(this.
this.
return this.
}
/**
* Compiles and preloads the module and its imports.
*
* @returns Promise.
*/
async preload() {
await this.evaluate();
}
}
//# sourceMappingURL=CSSModule.js.map