Closed veged closed 7 years ago
Also we need to add some notes about events__observable
, as a way to subscribe to bem-events from the outer world (see https://ru.bem.info/forum/1020/#comment-223608883).
Add notes about .bem()
argument change with examples for complex cases like https://github.com/bem/bem-components/blob/v3/common.blocks/control/control.js#L121
Don't forget to add changes from #1376 to the migration guide.
Add note about getDefaultParams
-> _getDefaultParams
to https://github.com/bem/bem-core/blob/v4/MIGRATION.ru.md#Имена-protected-методов-начинаются-с-_
There are two methods getName
and getEntityName
returning the same result (https://github.com/bem/bem-core/blob/v4/common.blocks/i-bem/i-bem.vanilla.js#L485-L499).
Which to use and why?
getEntityName
returns full BEM entity name, e.g. button
or Input__clear
in case of elem instance. getName
returns self name of the entity: button
and clear
for the same examples as above.
The former is primary used to build proper CSS class and to distinguish block instance from the elem.
@narqo take a look at the link I provided, the methods are implemented absolutely the same way (return this._name;
).
Update migration guide about _elems()
method (remove it from https://github.com/bem/bem-core/blob/v4/MIGRATION.ru.md#Имена-protected-методов-начинаются-с-_) and describe difference about this.elem()
VS this.elems().domElem
now.
This works in older versions:
Suggest.declMod({ modName : 'has-dataprovider' });
but doesn't work in v4
. Works only with asteriks:
Suggest.declMod({ modName : 'has-dataprovider', modVal : '*' });
@aristov see #1374
Looks like https://github.com/bem/bem-core/issues/1310#issuecomment-227145103 was missed.