Hi
My Site has many errors after update to 4.20, I know 4.2 version don't use dojo. How can I update dojo and dom codes at arcgis javascript 4.20 api? I don't know how can I update my code and which part of my codes should change?
for example:
on(dojo.query("#pse_meter"), "change", function () {
Regards
@anjelinaponkerat Dojo is not gone, it is just not required. In 4.x you should just use native HTML code to get dom elements.
const el = document.getElementById("#pse_meter");
el.addEventListener("change", function () {
Thanks
But I have these Errors:
Uncaught SyntaxError: Unexpected token '<'
Uncaught TypeError: BingMapsLayer is not a constructor
@anjelinaponkerat There are many code change you have to do if you are updating from 3.x to 4.x.
Sounds like you have some syntax error(s) in your code. Hard to say what.
Here is the doc link for 4.x BingMapsLayer.
If you don't want to re-write the code, you should be able to bring dojo into your project separately from the arcgis api:
https://dojotoolkit.org/download/
Either add the cdn url in a script tag to your index.html, or download the toolkit and link to it from your local copy.
Thanks for the information. How do I know, which dojo version I can use? Is there any recommendation?