Reading up on ComboBox component → Link
The last code example has this line request.url = ComboBox(evt.target).selectedItem.data;
What does ComboBox(evt.target) mean? Type casting? Why would you type cast?
For curiosity reasons, I replaced the last line of changeHandler() with it too: ComboBox(evt.target).selectedIndex = -1;. It works. Does it make the handler function more flexible, since I’m not referencing aCb instance?
you are casting the trigger of the event as a
ComboBox. You do this to explictly say that this variable is of this type. You don’t have to most of the times but when you do you get these advantagesevt.targetis not of type ComboBox after all