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
Hi, It's not clear to me how should I use it if not loading it via script tag. Or, how to build it into another js file.
I'm trying this:
import { crs } from '../node_modules/country-region-selector/dist/crs.min.js';
And it seems to work, but it's not really clear to me if it's the right way, and also why it's working, since if I then log the crs object, it's just undefined. Why? How to? Thank you.
The text was updated successfully, but these errors were encountered:
This is a very old script! This is now 5 years old, before es6 was all that standard. Normally you'd have just included it in your HTML file. It was back in the day when Bower was a thing. What you're doing it fine, but you should be able to just do this:
btw, the way it works is that that script automatically parses the DOM and finds the elements and then dynamically applies the code. Again, old fashioned, but works. :)
Hi, It's not clear to me how should I use it if not loading it via script tag. Or, how to build it into another js file.
I'm trying this:
import { crs } from '../node_modules/country-region-selector/dist/crs.min.js';
And it seems to work, but it's not really clear to me if it's the right way, and also why it's working, since if I then log the crs object, it's just undefined. Why? How to? Thank you.
The text was updated successfully, but these errors were encountered: