createWrappedComponent 
Prepare the input element with all bindings.
505172
function prepareElement() {

        $ELEMENT.

            // Store the picker data by component name.
            data(NAME, P).

            // Add the “input” class name.
            addClass(CLASSES.input).

            // Remove the tabindex.
            attr('tabindex', -1).

            // If there’s a `data-value`, update the value of the element.
            val( $ELEMENT.data('value') ?
                P.get('select', SETTINGS.format) :
                ELEMENT.value
            )


        // Only bind keydown events if the element isn’t editable.
        if ( !SETTINGS.editable ) {

            $ELEMENT.

                // On focus/click, focus onto the root to open it up.
                on( 'focus.' + STATE.id + ' click.' + STATE.id, function( event ) {
                    event.preventDefault()
                    P.$root[0].focus()
                }).

                // Handle keyboard event based on the picker being opened or not.
                on( 'keydown.' + STATE.id, handleKeydownEvent )
        }


        // Update the aria attributes.
        aria(ELEMENT, {
            haspopup: true,
            expanded: false,
            readonly: false,
            owns: ELEMENT.id + '_root'
        })
    }
419542
@Override
    public UIComponent createComponent(ValueExpression componentExpression,
                                       FacesContext context,
                                       String componentType)
          throws FacesException {
        return getWrapped().createComponent(componentExpression, context, componentType);
    }
1276804
function createInternalComponent(element) {
  !genericComponentClass ?  false ? invariant(false, 'There is no registered component for the tag %s', element.type) : _prodInvariant('111', element.type) : void 0;
  return new genericComponentClass(element);
}
727681
@Override
    public Component prepareRenderer(TableCellRenderer renderer, int row,
            int column) {
        Object value = getValueAt(row, column);
        boolean isSelected = isCellSelected(row, column);
        Component component = renderer.getTableCellRendererComponent(this, value,
                isSelected, false, row, column);

        PropertySheetTableModel.Item item = getSheetModel()
                .getPropertySheetElement(row);
        if (item.isProperty()) {
            component.setEnabled(item.getProperty().isEditable());
        }
        return component;
    }
594439
function prepareDOMElement(prepSettings) {
    var mode = prepSettings.mode;
    var el = prepSettings.el;
    var flags = prepSettings.flags;
    var _engineSettings = prepSettings.engineSettings;
    var dimensions = flags.dimensions,
        theme = flags.theme;
    var dimensionsCaption = dimensions.width + 'x' + dimensions.height;
    mode = mode == null ? (flags.fluid ? 'fluid' : 'image') : mode;
    var holderTemplateRe = /holder_([a-z]+)/g;
    var dimensionsInText = false;

    if (flags.text != null) {
        theme.text = flags.text;

        //<object> SVG embedding doesn't parse Unicode properly
        if (el.nodeName.toLowerCase() === 'object') {
            var textLines = theme.text.split('\\n');
            for (var k = 0; k < textLines.length; k++) {
                textLines[k] = utils.encodeHtmlEntity(textLines[k]);
            }
            theme.text = textLines.join('\\n');
        }
    }

    if (theme.text) {
        var holderTemplateMatches = theme.text.match(holderTemplateRe);

        if (holderTemplateMatches !== null) {
            //todo: optimize template replacement
            holderTemplateMatches.forEach(function (match) {
                if (match === 'holder_dimensions') {
                    theme.text = theme.text.replace(match, dimensionsCaption);
                }
            });
        }
    }

    var holderURL = flags.holderURL;
    var engineSettings = extend(_engineSettings, null);

    if (flags.font) {
        /*
        If external fonts are used in a <img> placeholder rendered with SVG, Holder falls back to canvas.

        This is done because Firefox and Chrome disallow embedded SVGs from referencing external assets.
        The workaround is either to change the placeholder tag from <img> to <object> or to use the canvas renderer.
        */
        theme.font = flags.font;
        if (!engineSettings.noFontFallback && el.nodeName.toLowerCase() === 'img' && App.setup.supportsCanvas && engineSettings.renderer === 'svg') {
            engineSettings = extend(engineSettings, {
                renderer: 'canvas'
            });
        }
    }

    //Chrome and Opera require a quick 10ms re-render if web fonts are used with canvas
    if (flags.font && engineSettings.renderer == 'canvas') {
        engineSettings.reRender = true;
    }

    if (mode == 'background') {
        if (el.getAttribute('data-background-src') == null) {
            DOM.setAttr(el, {
                'data-background-src': holderURL
            });
        }
    } else {
        var domProps = {};
        domProps[App.vars.dataAttr] = holderURL;
        DOM.setAttr(el, domProps);
    }

    flags.theme = theme;

    //todo consider using all renderSettings in holderData
    el.holderData = {
        flags: flags,
        engineSettings: engineSettings
    };

    if (mode == 'image' || mode == 'fluid') {
        DOM.setAttr(el, {
            'alt': theme.text ? (dimensionsInText ? theme.text : theme.text + ' [' + dimensionsCaption + ']') : dimensionsCaption
        });
    }

    var renderSettings = {
        mode: mode,
        el: el,
        holderSettings: {
            dimensions: dimensions,
            theme: theme,
            flags: flags
        },
        engineSettings: engineSettings
    };

    if (mode == 'image') {
        if (!flags.auto) {
            el.style.width = dimensions.width + 'px';
            el.style.height = dimensions.height + 'px';
        }

        if (engineSettings.renderer == 'html') {
            el.style.backgroundColor = theme.bg;
        } else {
            render(renderSettings);

            if (flags.textmode == 'exact') {
                el.holderData.resizeUpdate = true;
                App.vars.resizableImages.push(el);
                updateResizableElements(el);
            }
        }
    } else if (mode == 'background' && engineSettings.renderer != 'html') {
        render(renderSettings);
    } else if (mode == 'fluid') {
        el.holderData.resizeUpdate = true;

        if (dimensions.height.slice(-1) == '%') {
            el.style.height = dimensions.height;
        } else if (flags.auto == null || !flags.auto) {
            el.style.height = dimensions.height + 'px';
        }
        if (dimensions.width.slice(-1) == '%') {
            el.style.width = dimensions.width;
        } else if (flags.auto == null || !flags.auto) {
            el.style.width = dimensions.width + 'px';
        }
        if (el.style.display == 'inline' || el.style.display === '' || el.style.display == 'none') {
            el.style.display = 'block';
        }

        setInitialDimensions(el);

        if (engineSettings.renderer == 'html') {
            el.style.backgroundColor = theme.bg;
        } else {
            App.vars.resizableImages.push(el);
            updateResizableElements(el);
        }
    }
}
134320
protected void initEditHandler(Element handlerElement) {

        String editHandlerClass = handlerElement.attributeValue(APPINFO_ATTR_CLASS);
        Map<String, String> params = Maps.newHashMap();
        Element paramsElement = handlerElement.element(APPINFO_PARAMETERS);
        if (paramsElement != null) {
            for (Element paramElement : paramsElement.elements(APPINFO_PARAM)) {
                String name = paramElement.attributeValue(APPINFO_ATTR_NAME);
                String value = paramElement.getText();
                params.put(name, value);
            }
        }
        try {
            m_editHandler = (I_CmsEditHandler)Class.forName(editHandlerClass).newInstance();
            m_editHandler.setParameters(params);
        } catch (Exception e) {
            LOG.error(e.getMessage(), e);
        }
    }
983619
@Override
    public void processElement(Wrapper<Element> elementWrapper) {
        builder.append(baseIndent).append("elementContent=").append(elementWrapper).append("\n");
    }
539510
function(item)
	{
		var boundView, element, i;

		if(!this.viewTemplate)
		{
			element = this.view.element.cloneNode(true);

			this.boundViewOptions.element = element;

			boundView = new this.view.constructor(this.boundViewOptions);

			boundView._collectionBinder = null;
			boundView._modelBindersMap = this.view._modelBindersMap.clone();

			this.boundViews.push(boundView);
			i = this.boundViews.length - 1;

			boundView.scope['*'] = this.cursor.refine([i]);
			if(this.view._itemAlias) boundView.scope[this.view._itemAlias] = boundView.scope['*'];

			boundView.setBindingIndex(i);

			boundView.renderAll();

			this.viewTemplate = boundView._clone();
			this.elementTemplate = element.cloneNode(true);
		}
		else
		{
			element = this.elementTemplate.cloneNode(true);
			boundView = this.viewTemplate._clone();
			boundView._setParentView(this.view);

			this.boundViews.push(boundView);
			i = this.boundViews.length - 1;

			boundView.scope['*'] = this.cursor.refine([i]);
			if(this.view._itemAlias) boundView.scope[this.view._itemAlias] = boundView.scope['*'];

			boundView.setBindingIndex(i);
			boundView._rebindElement(element);
		}

		element.setAttribute(settings.DATA_RENDERED_ATTR, true);

		boundView._itemAlias = this.view._itemAlias;
		boundView._modelBindersMap.setView(boundView);

		return boundView;
	}
332194
function bindRenderText(boundText, compileNode, view) {
    var /** @type {?} */ valueField = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__compiler_util_binding_util__["a" /* createCheckBindingField */])(view);
    var /** @type {?} */ evalResult = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__compiler_util_expression_converter__["b" /* convertPropertyBinding */])(view, view, view.componentContext, boundText.value, valueField.bindingId);
    if (!evalResult) {
        return null;
    }
    view.detectChangesRenderPropertiesMethod.resetDebugInfo(compileNode.nodeIndex, boundText);
    view.detectChangesRenderPropertiesMethod.addStmts(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__compiler_util_binding_util__["b" /* createCheckBindingStmt */])(evalResult, valueField.expression, __WEBPACK_IMPORTED_MODULE_9__constants__["g" /* DetectChangesVars */].throwOnChange, [__WEBPACK_IMPORTED_MODULE_6__output_output_ast__["e" /* THIS_EXPR */].prop('renderer')
            .callMethod('setText', [compileNode.renderNode, evalResult.currValExpr])
            .toStmt()]));
}
1348343
function ensureDOMElement (input) {
  let domElement = null
  let tmp = null
  if (input instanceof Element) {
    return input
  } else if ('string' == typeof input) {
    tmp = document.createElement('div')
    tmp.innerHTML = input
    domElement = tmp.innerHTML.length ? tmp.children[0] : new Template(input)
  } else {
    domElement = document.createElement('div')
  }
  return domElement
}
644892
@Override
    protected void prepareActions() throws QTasteTestFailException {
        mSelectState = Boolean.parseBoolean(mData[0].toString());
        if (!(component instanceof AbstractButton)) {
            throw new QTasteTestFailException("Unsupported component.");
        }
    }
893430
private static Object saveBindings(FacesContext context,
                                       Map<String, ValueExpression> bindings) {

        // Note: This code is copied from UIComponentBase.  In a future
        // version of the JSF spec, it would be useful to define a
        // attribute/property/bindings/state helper object that can be
        // shared across components/behaviors/validaters/converters.
        
        if (bindings == null) {
            return (null);
        }

        Object values[] = new Object[2];
        values[0] = bindings.keySet().toArray(new String[bindings.size()]);

        Object[] bindingValues = bindings.values().toArray();
        for (int i = 0; i < bindingValues.length; i++) {
            bindingValues[i] = UIComponentBase.saveAttachedState(context, bindingValues[i]);
        }

        values[1] = bindingValues;

        return (values);
    }
615093
function prepareAndStyle() {
    var viewBoxSize = this.config ? this.config.viewBoxSize : config.defaultViewBoxSize;
    angular.forEach({
      'fit': '',
      'height': '100%',
      'width': '100%',
      'preserveAspectRatio': 'xMidYMid meet',
      'viewBox': this.element.getAttribute('viewBox') || ('0 0 ' + viewBoxSize + ' ' + viewBoxSize),
      'focusable': false // Disable IE11s default behavior to make SVGs focusable
    }, function(val, attr) {
      this.element.setAttribute(attr, val);
    }, this);
  }
1166377
protected String newJavaScript(final Component component)
	{
		final StringBuilder sb = new StringBuilder();
		sb.append("setTimeout(" + "function() {" + "var component = document.getElementById(\"")
			.append(component.getMarkupId()).append("\");");
		if (clearValue)
		{
			sb.append("component.value = \"\";");
		}
		sb.append("component.focus();");
		sb.append("}, " + this.delay + ")");
		return sb.toString();
	}
932259
function init ($container, elementSelector, eventSelectors, handler) {
      $container = $container || $(document.body)

      // Handle control clicks
      function deferred () {
        var $control = $(this)
        handler($control, getToggledContent($control))
      }

      // Prepare ARIA attributes
      var $controls = $(elementSelector)
      $controls.each(initToggledContent)

      // Handle events
      $.each(eventSelectors, function (idx, eventSelector) {
        $container.on('click.' + selectors.namespace, eventSelector, deferred)
      })

      // Any already :checked on init?
      if ($controls.is(':checked')) {
        $controls.filter(':checked').each(deferred)
      }
    }
431026
public static void generateJSEventHandlers(ResponseWriter rw, UIComponent component) throws IOException {
		Map<String, Object> attributes = component.getAttributes();
		String[] eventHandlers = {"onclick", "onblur", "onmouseover"};
        for (String event:eventHandlers) {
        	String handler = A.asString(attributes.get(event));
        	if (null != handler) {
        		rw.writeAttribute(event, handler, event);
        	}
        }
	}
1168539
function() {
	
	   // Create a DIV element to wrap the editing el and the image
	   this.divEl = inputEx.cn('div', {className: 'inputEx-fieldWrapper'});
	   if(this.options.id) {
	      this.divEl.id = this.options.id;
	   }
	   if(this.options.required) {
	      Dom.addClass(this.divEl, "inputEx-required");
	   }
	   
	   // Label element
	   if (YAHOO.lang.isString(this.options.label)) {
	      this.labelDiv = inputEx.cn('div', {id: this.divEl.id+'-label', className: 'inputEx-label', 'for': this.divEl.id+'-field'});
	      this.labelEl = inputEx.cn('label', null, null, this.options.label === "" ? "&nbsp;" : this.options.label);
	      this.labelDiv.appendChild(this.labelEl);
	      this.divEl.appendChild(this.labelDiv);
      }
      
      this.fieldContainer = inputEx.cn('div', {className: this.options.className}); // for wrapping the field and description
	
      // Render the component directly
      this.renderComponent();
      
      // Description
      if(this.options.description) {
         this.fieldContainer.appendChild(inputEx.cn('div', {id: this.divEl.id+'-desc', className: 'inputEx-description'}, null, this.options.description));
      }
      
   	this.divEl.appendChild(this.fieldContainer);
      
	   // Insert a float breaker
	   this.divEl.appendChild( inputEx.cn('div',null, {clear: 'both'}," ") );
	
	}