importJSFile method
Implementation
Future<void> importJSFile(String library) async {
final head = html.querySelector('head');
if (library.endsWith('.js')) {
await _createScriptTag(library, head: head);
} else if (library.endsWith('.css')) {
await _createCssLinkTag(library, head: head);
}
}