Subclass & Override Method 子类化并重写方法
If a subclass of one of these classes needed to override the default behavior, it could do so by overriding the method.
如果这些类中的任何一个的子类需要覆盖默认行为,那么可以通过覆盖这个方法实现。
In a subclass you can make assumptions about the internal state of the superclass when the method you override is getting called.
当子类所重写的方法被调用时,你可以在子类中对父类的内部状态进行操作。
You can also override a Dojo widget method, subclass an existing Dojo widget for special behavior, or create your own widget.
也可以覆盖一个Dojo小部件方法、针对特定行为子类化一个现有的Dojo小部件或创建您自己的小部件。
应用推荐