-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nest options #103
nest options #103
Conversation
|
||
for (key in elData) { | ||
val = elData[key]; | ||
if (!(key.match("^sqwidget"))) { continue; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking if we should make all the data attributes available to the config? There's no harm in it and may keep embed codes shorter for someone.
I won't want to use something that's not prefixed for my own projects - but someone may.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
w3c recommends prefixing.
On 7 November 2013 at 17:27:17, Adhip Gupta ([email protected]) wrote:
}
- key = key.replace("sqwidget", "").toLowerCase();
- data[key || "url"] = val;
- };
+- for (key in elData) {
- val = elData[key];
- if (!(key.match("^sqwidget"))) { continue; }
I'm thinking if we should make all the data attributes available to the config? There's no harm in it and may keep embed codes shorter for someone.
I won't want to use something that's not prefixed for my own projects - but someone may.
Reply to this email directly or view it on GitHub:
https://github.com/premasagar/sqwidget/pull/103/files#r7502938
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So should we make this prefix a little more configurable? #97
delete elData.sqwidget; | ||
} | ||
|
||
var nest = function( names, data, val ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This definitely needs to be documented.
sqwidget-css-moo-baa="gorch" becomes
{ "css": { "moo": { "baa": "gorch } } }
in config