Skip to content

IDEA: V1 FINAL PATCH  #198

@ghost

Description

A thought for backwards compatibility to think about....
This is the thought I was having while I was setting up branches for the v2s docs.

I was having thoughts of putting in one final change branch to the v1 repo so that it would scrub xtag and it's dependent methods and present them differently to the window's object so that v2 could read the prior version and inherit it's features.

For instance, when you load xtag into the global scope you could search the header dom for a meta tag with the appropriate name/content information. Like:

var _h = document.querySelector("meta[name='x-tag']"),
     _v = _h.content ;
if(_v==="2") { _DEFINE_METHOD(); }
else{ NO_CHANGES_KEEP_LATEST_V1_ }

I am not sure if this is a direction you ever thought of going, but an advantage to using a method that utilizes meta content is that it would be more flexible to other developers wanting to mix-in their own code or dependencies that require features on versions of other libraries by making that info readily available.

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