Warnings of valid HTML5 attributes in Eclipse -
i use eclipse , write jsp files html5 content. have example line:
<div class="test" data-role="test123">
in eclipse warning:
undefined attribute name (data-role)
what needed done these warnings won't appear anymore? in html5 attribute allowed (data-*) can see here: http://ejohn.org/blog/html-5-data-attributes/
best regards.
it seems eclipse still has problems validating html5 elements , attributes now.
i'm running mars 4.5.1 , have had warnings <main>
element, despite fact there no warnings <section>
element.
but there solution!
window > preferences > web > html files > validation
here can tick ignore specified element names in validation
checkbox , enter names of elements eclipse incorrectly warning about.
in case, want tick ignore specified attribute names in validation
checkbox , enter data-role
attribute.
after click 'apply', eclipse ask full validation of project. select 'yes' , changes take effect.
no more squiggly yellow lines yay! :d
Comments
Post a Comment