How to use the type.getName function in type

To help you get started, we’ve selected a few type examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github raptorjs-legacy / raptorjs / lib / raptor / widgets / widgets_browser.js View on Github external
widget.registerMessages(['beforeDestroy', 'destroy'], false);
            
            // Check if the user's widget has an additional events defined
            var allowedEvents = proto.events || OriginalWidgetClass.events;

            if (allowedEvents) {
                widget.registerMessages(allowedEvents, false);
            }
            
            // Add required specified properties required by the Widget mixin methods
            if (id) {
                widget._id = id;
                widget.el = widget.getEl();
            }

            if (!OriginalWidgetClass.getName) {
                OriginalWidgetClass.getName = function() {
                    return type;
                };
            }
            
            proto.constructor = OriginalWidgetClass;

            if (Widget.legacy) {
                widget._parentWidget = parent;
            }
            
            if (events) {
                widget._events = _convertEvents(events);
            }
            
            widget.widgets = new Document(); //This widget might have other widgets scoped within it
github raptorjs-legacy / raptorjs / lib / raptor / widgets / widgets_browser.js View on Github external
// Check if the user's widget has an additional events defined
            var allowedEvents = proto.events || OriginalWidgetClass.events;

            if (allowedEvents) {
                widget.registerMessages(allowedEvents, false);
            }
            
            // Add required specified properties required by the Widget mixin methods
            if (id) {
                widget._id = id;
                widget.el = widget.getEl();
            }

            if (!OriginalWidgetClass.getName) {
                OriginalWidgetClass.getName = function() {
                    return type;
                };
            }
            
            proto.constructor = OriginalWidgetClass;

            if (Widget.legacy) {
                widget._parentWidget = parent;
            }
            
            if (events) {
                widget._events = _convertEvents(events);
            }
            
            widget.widgets = new Document(); //This widget might have other widgets scoped within it