[whatwg] Suggestion: <ignore> element.

Matthew Raymond mattraymond at earthlink.net
Mon Jul 5 14:56:49 PDT 2004


Mike Shaver wrote:
 > I like it, and I think that future-proofing it via a version or
 > unless="webforms2" attribute, like was done for <script
 > language="JavaScript1.1"> would make it even better.

Dave Hodder wrote:
 > Sounds good to me, although quite what is being <ignore>d seems a
 > little ambiguous from the name of the element.  It seems very similar
 > to the various <noscript>, <noembed>, <noframes> type tags -- so
 > perhaps it could have a more descriptive name, e.g.
 > <nowebforms version="2.0"> or <nowebforms2> or similar?
 >
 > (Just a thought.)

    It was explained to me by Ian that you can't depend on the user 
agent to correctly report what standards it supports. Therefore, putting 
in an attribute with specific values for standards won't work, nor will 
using standard-specific tags. However, the following might be a better idea:

<ignore if="WF2Compliant()">
   ...Content...
</ignore>

    The value of the |if| attribute would be a script that would return 
a true or false value. The default for |if| would be "true". In this 
manner, people can come up with their own scripts to determine if the 
contents of the element should be ignored. Also, if methods of detecting 
standards support become more reliable in the future, it can simply be 
coded into a Javascript function called by the |if| attribute.

    In another thread, I also suggested an |ignore| attribute. I suppose 
if you changed the way this attribute works to make it more like the 
|if| attribute, it could be equally useful:

<div class="legacy" ignore="WF2Compliant()">
   ...Content...
</div>

    Unlike the |if| attribute, however, the default for this modified 
version of |ignore| would be "false".

    The main problem with these versions of "ignore" is that they depend 
on scripting being enabled. Then again, I suppose that the default 
values could apply when scripting is disabled.

    Another solution is to create a hybrid system where names for 
standards can be used, but a script could also be called if the 
webmaster put in "script(Javascript_Here())". In that way, webmasters 
could use still do this...

<div class="legacy" ignore="Web Forms 2.0">
   ...Content...
</div>

...But if they found out that that's not reliable later, they could do this:

<div class="legacy" ignore="script(WF2Compliant())">
   ...Content...
</div>

    Your thoughts?


More information about the whatwg-whatwg.org mailing list