This commit is contained in:
vigdorov
2020-07-07 00:45:10 +03:00
parent 6dabdd42c0
commit 8e1b988489
3 changed files with 10 additions and 1 deletions

1
.gitignore vendored
View File

@ -2,5 +2,6 @@
.idea .idea
/dist /dist
/node_modules /node_modules
/out
**.DS_Store **.DS_Store

View File

@ -5,7 +5,9 @@
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"build": "webpack --mode=production", "build": "webpack --mode=production",
"start": "webpack-dev-server" "start": "webpack-dev-server",
"docs": "jsdoc -r ./src",
"show:docs": "lite-server --baseDir=\"out\""
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -23,18 +23,23 @@
class Component { class Component {
/** /**
* @private * @private
*
* @type {Listener[]} * @type {Listener[]}
*/ */
_listeners; _listeners;
/** /**
* События компонента
* @private * @private
*
* @type {Events} * @type {Events}
*/ */
_events; _events;
/** /**
* Корневой элемент компонента
* @public * @public
*
* @type {Node} - корневой элемент компонента * @type {Node} - корневой элемент компонента
*/ */
mainNode; mainNode;
@ -42,6 +47,7 @@ class Component {
/** /**
* @param {string} mainNodeSelector - селектор, с помощью которого извлекается шаблон компонента * @param {string} mainNodeSelector - селектор, с помощью которого извлекается шаблон компонента
* @param {Node} parentNode - родительский Node, в который следует положить созданный элемент * @param {Node} parentNode - родительский Node, в который следует положить созданный элемент
* @constructor
*/ */
constructor(mainNodeSelector, parentNode) { constructor(mainNodeSelector, parentNode) {
/** /**