INNER CODE UNIT · JavaScript

addComponent

moddio/taro · engine/components/network/net.io/net.io-server/index.js:98

	var addComponent = function (component, options) {
		var newComponent = new component(this, options);
		this[newComponent.componentId] = newComponent;
		return this;
	};

	/**
         * Copies all properties and methods from the classObj object
         * to "this". If the overwrite flag is not set or set to false,
         * only properties and methods that don't already exists in
         * "this" will be copied. If overwrite is true, they will be
         * copied regardless.
         */
	var implement = function (classObj, overwrite) {
		var i; var obj = classObj.prototype || classObj;

		// Copy the class object's properties to (this)
		for (i in obj) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…