Haroenv/holmes

Add option to create a new instance without starting to listen

Haroenv opened this issue · 1 comments

Implementation-wise, this is quite simple, it's just an if for that option before starting, similar to .instant.

I have no idea what to call it though.

This is useful for when you want to set h.options.xxx after initialisation of the instance, but don't want to use the options object or stop and then start again.

Since you can set the options when initialising, I don't see this as being a problem. Cases when you want this would be when the DOMContentLoaded has already passed I think, so in that case you will have to explicitly decide when to .start().

If you have a problem with this, let me know 😄