bigpicture.js icon indicating copy to clipboard operation
bigpicture.js copied to clipboard

Change HTML API to `data-bp-*`?

Open tomByrer opened this issue 10 years ago • 2 comments

Data attributes are starting to be used more & more. To help prevent conflicting with another JS script, could you please add a "namespace"? EG: data-bp-x for "BigPicture X position"? Or data-bpx or data-bp_x...

Please don't make the internet crash with data-x! (OK, I joke)

tomByrer avatar Dec 10 '14 01:12 tomByrer

Hi @tomByrer, thanks for your idea! :) I'm currently thinking about probably better names for the attributes. By the way, do you have any example in mind of library (that would be used together with bigpicture.js) that would conflict with data-x?

josephernest avatar Dec 11 '14 11:12 josephernest

http://jmpressjs.github.io/docs/inline.html https://github.com/bartaz/impress.js/blob/master/index.html#L166 <- your competitor... if act the same perhaps keep open to ease switching? (uses data-x-*) https://github.com/rabbitmq/rabbitmq-perf-html

Examples where people might copy-paste into live code: http://stackoverflow.com/questions/7422580/dom-data-x-attribute-compatibility-is-this-safe https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes http://ajaxian.com/archives/embed-your-data-in-html-5

I'm sure there is & will be more; too lazy to go deep in the google hole.

tomByrer avatar Dec 11 '14 13:12 tomByrer