rikschennink / conditioner

💆🏻 Frizz free, context-aware, JavaScript modules

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Selectively disable conditioner behaviour per module

LostCrew opened this issue · comments

hi, thanks again for yesterday's great talk in amsterdam.

you asked for feedbacks and here i am.
wouldn't be useful to add an option to selectively disable the load/unload of a module? in certain cases, i guess the user might feel the need to disable the load/unload behaviour. that option would provide him a initialization-driven and programmatic way to do that.
something like data-enabled="false", that is overridable on the JS side.
that would also mean that the user should be able to retrieve the current instances of module managed by conditioner.
thoughts?

commented

With user do you mean end-user or developer?

The data-initialized attribute contains the currently loaded module ids if modules have been initialized on the node.

You can currently access all initialized modules using conditioner.getModule(...) see the getModule API docs.

@rikschennink allright, thanks for the follow-up and sorry for my late answer. keep it going!