diff --git a/src/base/extStore.js b/src/base/extStore.js index eed0d2e..b00ff7c 100644 --- a/src/base/extStore.js +++ b/src/base/extStore.js @@ -385,7 +385,7 @@ class ExtStorage { } /** - * + * Returns a function that will setup the distribution of a given styling. * @returns {function(SStoreDefinition,HTMLElement,number): boolean} */ getStylingDistribution() { @@ -576,7 +576,8 @@ function identifyAndResolveOverwrite(targetContainer, compareKey, newValue, over } /** - * + * Creates a new Script Tag + * and then fills the given css rules into it. * @param {Array} ssdArray * @returns {HTMLScriptElement} */ @@ -595,6 +596,7 @@ function generateAndFillScriptTag(ssdArray) { return tag; } + /** * * @param {string} selector diff --git a/src/component/Component.js b/src/component/Component.js index aa9b3b4..b681291 100644 --- a/src/component/Component.js +++ b/src/component/Component.js @@ -395,7 +395,7 @@ class Component extends StyleAndScriptStoringComponent { /** * Ends chain. * Applies all modifications on the element. - * Processes alls stored additions. + * Processes all stored additions. * Returns the constructed HTMLElement of this Component. * * @param {CompelGenerator} generator @@ -557,6 +557,4 @@ class Component extends StyleAndScriptStoringComponent { return _wenity; } - - } diff --git a/src/generators/generator.js b/src/generators/generator.js index e1e43b7..5b9a02c 100644 --- a/src/generators/generator.js +++ b/src/generators/generator.js @@ -1,5 +1,5 @@ /** - * This module defines the Component generator. + * This class defines the Component generator. * It externalizes all decision making about script or style storage from the component. * The component stores the generator (if set, if not =default or passed down from parent component). * The CompelGenerator class enables the setup/definition of storage, generation and distribution. @@ -13,7 +13,6 @@ * Therefore the usages of CompelGenerator-feature-logic resets all style and script storages to local. * Only towards the end (when "generate()" is called) any of that will be resolved. */ - class CompelGenerator { /** * @param {null} [styleStore=null] @@ -24,8 +23,11 @@ class CompelGenerator { this._functionStore = functionStore; } + /** + * Deals with the direct component stylings * @param {Component} component + * @param {Array} childrenWenity * @param {ExtStorage} extStore * @returns {Array} */ @@ -63,8 +65,12 @@ class CompelGenerator { return forCollection; } + /** + * First deals with the scripts/functions. * + * @param {Component} component + * @param {Array} childrenWenity * @param {ExtStorage} extStore * @returns {Array} */ @@ -127,7 +133,14 @@ class CompelGenerator { return childWT; } + /** + * Iterates over the children of the component + * and calls generate on each child. + * The resulting compext (the text of the component) is added/appended accordingly. + * If the generation returns with delegatable scripts or styles + * the WebTrinity object is collected in an array, + * which will be returned. * * @param {Component} component * @returns {Array}