Access to module elements in console

85 views
Skip to first unread message

Selda Sörf

unread,
Dec 10, 2020, 7:33:31 AM12/10/20
to Chrome DevTools

Using ES6 modules during development I wonder that the only way to access the elements inside modules (functions, variables) is via workarounds:

- Either manually add them to the global window object or
- via dynamic import: import('mod1.js').then(m => { mod1 = m })

Wouldn't it be nice to have module access without those?

guest271314

unread,
Jan 10, 2021, 9:58:52 AM1/10/21
to Chrome DevTools
What is meant by "access"? Why is using a module ncessary?
Reply all
Reply to author
Forward
0 new messages