You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What specific section or headline is this issue about?
Return value
What information was incorrect, unhelpful, or incomplete?
I think it would be useful to mention that dynamic imports can fail if the user isn't connected to the internet. This is important for mobile users with spotty internet connections. Ideally it would be useful to document what kinds of errors different browsers return when a dynamic import request fails, and if it's possible to disambiguate between the server returning a 404 and the request failing because there's no internet connection.
Consider the use-case of an application that loads features dynamically as the user performs certain actions.
What did you expect to see?
Give an example of what happens if the user isn't connected to the internet when calling import(). Is the failure cached or can the developer just retry the request when the internet is back?
Actually, it would be very useful to document how caching impacts dynamic module imports as well.
Do you have any supporting links, references, or citations?
MDN URL
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import
What specific section or headline is this issue about?
Return value
What information was incorrect, unhelpful, or incomplete?
I think it would be useful to mention that dynamic imports can fail if the user isn't connected to the internet. This is important for mobile users with spotty internet connections. Ideally it would be useful to document what kinds of errors different browsers return when a dynamic import request fails, and if it's possible to disambiguate between the server returning a 404 and the request failing because there's no internet connection.
Consider the use-case of an application that loads features dynamically as the user performs certain actions.
What did you expect to see?
Give an example of what happens if the user isn't connected to the internet when calling
import()
. Is the failure cached or can the developer just retry the request when the internet is back?Actually, it would be very useful to document how caching impacts dynamic module imports as well.
Do you have any supporting links, references, or citations?
No response
Do you have anything more you want to share?
No response
MDN metadata
Page report details
en-us/web/javascript/reference/operators/import
The text was updated successfully, but these errors were encountered: