On 2011-05-17 22:12, Adam D. Ruppe wrote:
side note::* After looking at haml yesterday, I'm tempted to do a nothrow requireSelector. Again, can't think of a name. But what it'd do is try to get the first element that matches the css syntax. If it's not there, it starts from the best path that does exist and creates the rest. So if you have a blank element<html></html> and you do: makeSelector("html"); // that root node is returned since it exists makeSelector("div> span.date"); That doesn't exist, so it does a return document.root.addChild("div").addChild("span").className("date"); Though, I don't think I have a use for it; it'd be harder to use than just writing the html yourself in the template file. :: end side note
Sounds more like jQuery than HAML. -- /Jacob Carlborg
