Article Continues Under
WARNING: there are experimental parts and deeply controversial syntaxes forward! Proceed at your personal peril! You may have been warned, and the web site you save…might be your personal. Ten years in the past, proper right here in ALA, a wild-eyed hell-raiser going by “PPK” made a radical proposal: customized attributes in markup.
Properly, okay. On the time it was radical. Right here sooner or later, we’ve got completely legitimate HTML5 data-
attributes to comprise all method of knowledge and act as behavioral triggers for our scripts.
All of this holds as true at present because it did a decade in the past. I do know I’ve used data-
attributes for each: to invoke customized habits with out touching the lessons I exploit for styling—holding my behavioral layers and presentation layers separate—and to move related configuration info to mentioned scripts. Picturefill 1’s data-
involves thoughts: we might outline an attribute and write a script that dictates how the related aspect ought to behave, multi functional completely legitimate bundle.
maxlength
? required
? These customized attributes that when so daringly flew within the face of typical internet requirements at the moment are half of the HTML5 commonplace.
Perhaps it’s finest that the net didn’t linger too lengthy on our warning on the high of the web page.