Socks - A javascript UI toolkit inspired by Shoes
wiki.github.com
Socks - A javascript UI toolkit inspired by Shoes
1–10 of 10 posts
Re: Socks - A javascript UI toolkit inspired by Shoes
#2Re: Socks - A javascript UI toolkit inspired by Shoes
#3Also, a shoes-like syntax is already available in JavaScript, though it would be very hard to utilize as-is (in
app: {
stack: {
para("Foo 1"); // para as a function
para: "Foo 2"; // para as a label
button: {
let bar = new Button("Bar");
bar.onclick = function() { alert("Baz!") }
};
flow: {
style: ({ // CSS block
color: "red",
after: {
content: "!"
}
});
para("This is red and ends with an exclamation point");
}
}
}Re: Socks - A javascript UI toolkit inspired by Shoes
#4I called it Sandals and it's dead mainly because I'm lazy but also because I find it stupid to re-invent the wheel. YAY yet another UI toolkit to learn grumble
Re: Socks - A javascript UI toolkit inspired by Shoes
#5Re: Socks - A javascript UI toolkit inspired by Shoes
#6Re: Socks - A javascript UI toolkit inspired by Shoes
#7That doesn't look like JS syntax... am I missing something, or are they using JS to parse/interpret it?
Re: Socks - A javascript UI toolkit inspired by Shoes
#8IMO, a better MIME type would be application/socks+ecmascript or application/socks+javascript instead of application/javascript-socks. That looks closer to how content types that are built on XML have their MIME types. For example, XHTML's MIME type is application/xhtml+xml, not application/xml-xhtml. Also, a shoes-like syntax is already available in JavaScript, though it would be very hard to utilize as-is (in app:…
Re: Socks - A javascript UI toolkit inspired by Shoes
#9http://cloud.github.com/downloads/petejkim/socks/socks-chaos...
And the code: http://gist.github.com/113435
Re: Socks - A javascript UI toolkit inspired by Shoes
#10That doesn't look like JS syntax... am I missing something, or are they using JS to parse/interpret it?
It's JavaScript object literal syntax.