{"issue":{"milestone":null,"user":{"id":887698,"login":"DavidPesta","url":"https://api.github.com/users/DavidPesta","gravatar_id":"a06df2cfcf62a7331f5bef452b49fd0d","avatar_url":"https://secure.gravatar.com/avatar/a06df2cfcf62a7331f5bef452b49fd0d?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"title":"Data bindings don't seem to work when element attributes are hyphenated","created_at":"2011-12-15T16:08:50Z","labels":[],"updated_at":"2011-12-16T16:41:01Z","state":"closed","id":2568770,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"html_url":"https://github.com/arturadib/agility/issues/62","closed_at":"2011-12-16T16:41:01Z","body":"I've been testing Agility.js with SVG. Data bindings don't seem to work for element attributes that have a hyphen in them.\r\n\r\nThe following works for stroke-width, giving the circle a stroke width of 10:\r\n\r\n    var obj = $$(\r\n      {\r\n        radius: 200,\r\n        centerx: 300,\r\n        centery: 300\r\n      },\r\n      ' \\\r\n      <svg> \\\r\n        <circle stroke=\"black\" fill=\"red\" stroke-width=\"10\" data-bind=\"r radius, cx centerx, cy centery\" /> \\\r\n      </svg> \\\r\n      '\r\n    );\r\n    $$.document.append(obj);\r\n\r\n\r\nBut the following does not work for the stroke-width element attribute:\r\n\r\n    var obj = $$(\r\n      {\r\n        radius: 200,\r\n        centerx: 300,\r\n        centery: 300,\r\n        strokeWidth: 10\r\n      },\r\n      ' \\\r\n      <svg> \\\r\n        <circle stroke=\"black\" fill=\"red\" data-bind=\"r radius, cx centerx, cy centery, stroke-width strokeWidth\" /> \\\r\n      </svg> \\\r\n      '\r\n    );\r\n    $$.document.append(obj);\r\n\r\nI hope this is helpful!","number":62,"url":"https://api.github.com/repos/arturadib/agility/issues/62","comments":4,"assignee":null},"action":"closed"}