How to use the metal.core.isFunction function in metal

To help you get started, we’ve selected a few metal 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 metal / metal.js / test / surfaces / SurfaceRenderer.js View on Github external
getSurfaceContent(surface) {
				var content = contentConfig[surface.surfaceElementId];
				return core.isFunction(content) ? content(this.component_) : content;
			}
		}
github metal / metal.js / test / Component.js View on Github external
render() {
				super.render();
				if (core.isFunction(opt_rendererContentOrFn)) {
					opt_rendererContentOrFn();
				} else {
					this.component_.element.innerHTML = opt_rendererContentOrFn;
				}
			}
		}
github metal / metal.js / src / Attribute.js View on Github external
callFunction_(fn, args) {
		if (core.isString(fn)) {
			return this[fn].apply(this, args);
		} else if (core.isFunction(fn)) {
			return fn.apply(this, args);
		}
	}
github deprecate / metal-router / src / Router.js View on Github external
		setter: (val) => val ? (core.isFunction(val) ? val : () => val) : null
	},
github metal / metal.js / src / SoyRenderer.js View on Github external
renderTemplateByName_(templateComponentName, templateName, opt_data) {
		var elementTemplate = SoyTemplates.get(templateComponentName, templateName);
		if (core.isFunction(elementTemplate)) {
			return this.renderTemplate_(elementTemplate, opt_data);
		}
	}