Skip to content
This repository was archived by the owner on Nov 15, 2017. It is now read-only.
This repository was archived by the owner on Nov 15, 2017. It is now read-only.

Remove jQuery dependency requirement? #349

Closed
@FagnerMartinsBrack

Description

@FagnerMartinsBrack

The plugin internals does not rely that much on jQuery and semantically it doesn't make much sense, jQuery is a library created only to manipulate the DOM, the same is expected from its plugins.

Maybe at the time it made sense using jquery namespace to prevent globals cluttering, since everyone were including it, but today there are many applications that don't need jQuery at all, and in some cases having jQuery as a dependency is more a burden than a benefit.

I am not saying to remove jQuery dependency, that can't happen due to historical reasons. What I am saying is that, considering the actual tendency of using MV* frameworks like angular and the (slow but ongoing) official specs, one could think about using jquery-cookie being jquery an optional dependency.

The intent is to leverage an existent plugin to fit additional use cases, or make it easy to do so. angular cookie, for example, doesn't let ppl provide additional options to the cookie. A limitation already addressed by jquery cookie a long time ago.

It would be useful to expose a decent api to integrate easily with angular and other tools that doesn't rely exclusively on jquery.

The idea would be to do something like this for v2, since it means a break in backwards compatibility (a new namespace will break existing code).

I vaguely remember something like this being brought upon but couldn't find the issue.

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions