Skip to content

Safe lazyInit on mods from js tech #1583

@belozer

Description

@belozer

After #1579 lazyInit in declMod not allowed because it affects the base block.

But we can use another way.

In static props store regex list selectors for lazyInit.

_lazyInitBySelector : [
    { check : /(^|\s)block(\s|$)/, lazyInit : true },
    { check : /(^|\s)block_mod_/, lazyInit : false },
    { check : /(^|\s)block_mod_val(\s|$)/, lazyInit : true },
    { check : /(^|\s)block_boolmod(\s|$)/, lazyInit : false },
]

and check class list on dom node for detect lazy initialization.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions