{"action":"created","issue":{"url":"https://api.github.com/repos/benmerckx/ithril/issues/8","repository_url":"https://api.github.com/repos/benmerckx/ithril","labels_url":"https://api.github.com/repos/benmerckx/ithril/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/benmerckx/ithril/issues/8/comments","events_url":"https://api.github.com/repos/benmerckx/ithril/issues/8/events","html_url":"https://github.com/benmerckx/ithril/issues/8","id":138857278,"number":8,"title":"Building ithril views programmatically? ","user":{"login":"cambiata","id":217074,"avatar_url":"https://avatars.githubusercontent.com/u/217074?v=3","gravatar_id":"","url":"https://api.github.com/users/cambiata","html_url":"https://github.com/cambiata","followers_url":"https://api.github.com/users/cambiata/followers","following_url":"https://api.github.com/users/cambiata/following{/other_user}","gists_url":"https://api.github.com/users/cambiata/gists{/gist_id}","starred_url":"https://api.github.com/users/cambiata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cambiata/subscriptions","organizations_url":"https://api.github.com/users/cambiata/orgs","repos_url":"https://api.github.com/users/cambiata/repos","events_url":"https://api.github.com/users/cambiata/events{/privacy}","received_events_url":"https://api.github.com/users/cambiata/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-03-07T01:09:17Z","updated_at":"2016-03-08T11:09:18Z","closed_at":"2016-03-08T11:05:47Z","body":"Is it  possible to somehow sidestep the templating part of ithril and instead build the view data dom tree programmatically?\r\n\r\nTo give a background: In my work with music notation, I build complex svg files (or openfl or cairo...) using an interface with the graphical components that I need. Something like:\r\n```\r\nclass TargetSvg implements ITargetGraphics {\r\n    public function new() { // instantiate an svg dom xml... }\r\n    public function drawLine(x1, y1 ... ) { // add an svg line element to the xml... }\r\n    public function drawCircle(x, y, r) { // add an svg circle element to the xml...}\r\n}\r\n\r\nclass TargetOpenfl implements ITargetGraphics {\r\n    public function new() { // instantiate a flash api sprite container }\r\n    public function drawLine(x1, y1 ...) { // draw a line on the container sprite using flash api }\r\n    public function drawCircle(x, y, r) { // draw a circle on the container sprite using flash api }\r\n}\r\n```\r\nAs it seems that mithril js handles svgs pretty well: \r\nWould it be possible to - in the same manner - instantiate a ithril view root object (in my case an svg) and then programmatically add elements (svg lines, circles or whatever) to that, preferrably using the same interface?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/benmerckx/ithril/issues/comments/193731352","html_url":"https://github.com/benmerckx/ithril/issues/8#issuecomment-193731352","issue_url":"https://api.github.com/repos/benmerckx/ithril/issues/8","id":193731352,"user":{"login":"benmerckx","id":10584189,"avatar_url":"https://avatars.githubusercontent.com/u/10584189?v=3","gravatar_id":"","url":"https://api.github.com/users/benmerckx","html_url":"https://github.com/benmerckx","followers_url":"https://api.github.com/users/benmerckx/followers","following_url":"https://api.github.com/users/benmerckx/following{/other_user}","gists_url":"https://api.github.com/users/benmerckx/gists{/gist_id}","starred_url":"https://api.github.com/users/benmerckx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benmerckx/subscriptions","organizations_url":"https://api.github.com/users/benmerckx/orgs","repos_url":"https://api.github.com/users/benmerckx/repos","events_url":"https://api.github.com/users/benmerckx/events{/privacy}","received_events_url":"https://api.github.com/users/benmerckx/received_events","type":"User","site_admin":false},"created_at":"2016-03-08T11:09:18Z","updated_at":"2016-03-08T11:09:18Z","body":"Alright, I was going to write up an example today but it seems you've found a way :)"}}