- From: Martin Kutschker <Martin.T.Kutschker@blackbox.net>
- Date: Sat, 26 Jun 2004 09:43:21 +0200 (METDST)
Matthew Raymond <mattraymond at earthlink.net> writes on Fri, 25 Jun 2004 22:16:37 +0200 (METDST): > For clarity, I'm reposting my sample code: > > ------------------------------------------------------------ > > <div id="myPopup" repeat="template"> > <p>Random popup stuff</p> > </div> > > <input type="text" value="some text" context="myPopup"> > > ------------------------------------------------------------ > > Martin Kutschker wrote: > > Why abuse an attribute? I like the general idea, but would > > favour either a new element instead of div or another new > > attribute. > > And exactly how would that work? Like this?: > > ------------------------------------------------------------ > > <popup id="myPopup"> > <p>Random popup stuff</p> > </popup> > > <haspopup value="myPopup"> > <input type="text" value="some text"> > </haspopup> > > ------------------------------------------------------------ No: ------------------------------------------------------------ <div id="myPopup" popup="popup"> <p>Random popup stuff</p> </div> > > <input type="text" value="some text" context="myPopup"> <input type="text" value="some text" context="myPopup"> ------------------------------------------------------------ I've had no problems with "context". But I'm stricly against rehashing elements or attributes. Especially if it's semantically an abuse. > I have the following problems with this approach: > > 1) If you avoid the WF2 template model, it requires new two new tags, > not one, as you can see. I said that replacing diff *might* be an alternative. > The repeat attribute already exists in WF2, > so why not use it? Because it was not meant for this and 'repeat="tenplate"' makes abosultely no sense for a popup. The naming is confusing. > 2) It doesn't fix any of the problems from my previous example. The > content inside the tag is still rendered in legacy UAs. Worse, at > least with a <div> you could set the CSS property "display" to "none". Well, Mozilla can handle unnown tags :-) But you're right introducing elements shouldn't be done light heartedly. > 4) The context attribute already exists in XUL, and my solution only > adds a single attribute. Why is this single attribute, which takes > advantage of a preexisting WF2 feature, so offensive to you? I didn't object to "context". Though I doubt if reusung a XUL attribute has any benefits. So this is the same to me: ------------------------------------------------------------ <input type="text" value="some text" popupid="myPopup"> ------------------------------------------------------------ Masi
Received on Saturday, 26 June 2004 00:43:21 UTC