As of jQuery 1.9, a widget can inherit from itself. I couldn’t find a real-world example of why this would be useful, and frankly the idea of inheriting from oneself breaks my brain. What is the purpose of this feature? What can I do using this feature that I couldn’t do previously, or would’ve been much harder previously?
Share
As it is said in the slide you linked us, “this is the ideal way to extend widgets“.
Now you can extend a widget without creating a new, “different” widget object (“different” meaning “another name”). You can add a functionality and still use the very same widget object name.
As we can see in the example, we can add a feature to the dialog object, which will appear in the already existent dialogs, i.e., you don’t need to create a new “extendedDialog” and then change existent code to use the “extendedDialog” object. Instead, the included functionality will be already available and working there.