bigpicture.js
bigpicture.js copied to clipboard
Change HTML API to `data-bp-*`?
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)
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?
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.