I use WebAppBuilder 2.22 (developer edition) to develop 3D web apps with my developed custom widgets (esri js API 4.22) for our portal.
However, I do not know why in all ESRI widgets code, everywhere when linking button click to a function, the linkage is wrapped with "this.own".
What is the purpose and benefit of doing it?
Solved! Go to Solution.
This is part of the _WidgetBase structure that Dojo uses. It makes sure that everything is dealt with properly when the widget is destroyed. Read more about it under the "Owning handles" section of this page https://dojotoolkit.org/documentation/tutorials/1.10/understanding_widgetbase/index.html
This is part of the _WidgetBase structure that Dojo uses. It makes sure that everything is dealt with properly when the widget is destroyed. Read more about it under the "Owning handles" section of this page https://dojotoolkit.org/documentation/tutorials/1.10/understanding_widgetbase/index.html
Thank you!
May I ask - I can write "this.someButton.onClick = this.someHandlerFunction;"
How is it, compared to "this.own(on(..." ?