aboutsummaryrefslogtreecommitdiffstats
path: root/ui/widget.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/widget.js')
-rw-r--r--ui/widget.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/widget.js b/ui/widget.js
index 7201b4fbf..d5fbd885c 100644
--- a/ui/widget.js
+++ b/ui/widget.js
@@ -56,6 +56,9 @@ $.widget = function( name, base, prototype ) {
var namespace = name.split( "." )[ 0 ];
name = name.split( "." )[ 1 ];
+ if ( name === "__proto__" || name === "constructor" ) {
+ return $.error( "Invalid widget name: " + name );
+ }
var fullName = namespace + "-" + name;
if ( !prototype ) {