in Javascript, import directive has two ways for loading external scripts. The first is static import:import { exports.name } from outside.js
that is an async approach, but only in loading phase. It is a sync approach during the execution phase and will block Javascript main thread. Note: static import directive can only be declared at the top level of the module.
The second is dynamic: import(url).then
that can be used anywhere you want.
().catch()import()
function returns a promise so its behavior is same to promise, which is executed in async method.
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)