I've made a casual examination, and I can't quite figure out which component creates the body tag. Of course I want to be able to set the class, but what I'd really like is for someone to point me to a place where I can read about how to do this?
Tony
"Tony" == Tony Giaccone tony@giaccone.org writes:
Tony> I've made a casual examination, and I can't quite figure out which component Tony> creates the body tag. Tony> Of course I want to be able to set the class, but what I'd really like is Tony> for someone to point me to a place where I can read about how to do this?
I used "methods containing string" on body, and found WAHtmlRoot >> #writeHeadOn: which appears to pick up attributes for the body tag from ivar bodyAttrs, which can be accessed in your app's #updateRoot: by sending #bodyAttributes to the passed-in root. This is an instance of WAHtmlAttributes, so you should be able to call #addClass: on it.
In other words, to your top level component, add instance-side:
updateRoot: root super updateRoot: root. root bodyAttributes addClass: 'yourBodyClass'.
Untested.
You should also subscribe to the seaside user list.
beginners@lists.squeakfoundation.org