On Dec 27, 6:27 pm, buda <[email protected]> wrote: > > If document is declared as strict or transitional it must validate > > against corresponding DTD's in order to be valid. When there's no > > declaration, there's nothing to validate against. If quirks mode is > > triggered by lack of doctype declaration, then validity does not even > > apply, since there's no declaration to validate against. Am I missing > > something? > > But if I decleared strict or transitional and then add a custom > attribute to an element - the browser swithes to quirck mode or Iam > wrong?
Of course not: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head><title></title></head> <body foo="bar"> <script type="text/javascript"> // writes "CSS1Compat" (would print "BackCompat" in Quirks) document.write(document.compatMode); </script> </body> </html> > > > > > > > It is indeed useful. HTML5 even introduced custom data-* attributes > > > > [1] > > > > When will it the standard? > > > 2022 > > Huh? we have enough time to fell free ))))) I'm sure we'll see different browsers implement most of html5 features long before this revision becomes a recommendation. Some of them are already present in modern browsers (e.g. `document.getElementsByClassName` or `document.querySelector`). Nevertheless, try not to use custom attributes, unless you want to run into troubles later on (e.g. remember that the entire DOM in IE is implemented in such way that there's no distinction between element attributes and properties). -- kangax --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---
