| Issue 252: | Use data-... attributes for all node options and remove `eval()` calls from code | |
| 4 people starred this issue and may be notified of changes. | Back to list |
Currently `eval()` is called to evaluate the `data`attribute. This is considered evil (http://stackoverflow.com/questions/86513/why-is-using-javascript-eval-function-a-bad-idea) and not allowed in `strict` mode (http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/) We can replace `eval()` with `jQuery.parseJSON()` As a consequence, the definition of <li data="url: 'http://jquery.com'">jQuery home is not valid JSON and has to be rewritten with double quotes as <li data='"url": "http://jquery.com"'>jQuery home
Dec 28, 2011
Maybe this should go with using different `data-...` attributes instead of a single `data`.
Labels:
-Type-Defect Type-Enhancement
Jan 11, 2012
Issue 269 has been merged into this issue.
Jan 25, 2012
(No comment was entered for this change.)
Summary:
Use data-... attributes for all node options and remove `eval()` calls from code
Jan 25, 2012
See also issue 276
Jan 26, 2013
(No comment was entered for this change.)
Labels:
-Milestone-Release1.3 Milestone-Release2.0
Oct 6, 2013
(No comment was entered for this change.)
Status:
Done
Owner: --- |
1.4 KB View Download