W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2004

[whatwg] Suggestion: <ignore> element.

From: Matthew Raymond <mattraymond@earthlink.net>
Date: Thu, 01 Jul 2004 11:11:07 -0400
Message-ID: <40E4298B.7050409@earthlink.net>
    I'd like to suggest a new element called <ignore>. This new element 
would act similar to a standard comment, but it would not remove its 
children from the DOM. Instead, the children would simply remain 
inactive within the <ignore> element until moved somewhere else. This 
element has the following benefits:

1) It has a semantic meaning, which is that its contents should be ignored.

2) It can easily be rendered by browsers using the "display: none" style.

3) When it degrades in legacy browsers, its contents are rendered. Not 
only does this mean you can use it as a proper replacement for a 
repetition template with repeat-start="0", but you can also use it to 
suppress legacy scripting:

    <ignore>
      <script language="ECMAScript" src="legacy.js"></script>
    </ignore>

    Using this method, you don't have to add in code that checks for 
WF2. You simply encapsulate the <script> element in <ignore> and it 
becomes inactive.

    Any comments?
Received on Thursday, 1 July 2004 08:11:07 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:35 UTC