JSFiddle - React, Tailwind, and code Playground
by SlexAxton
JavaScript
// Since forms have a default value of 'application/x-www-form-urlencoded'
// we can just create a form and test which property works.
// Chrome can do both, so just default to the standard one (enctype)
// via http://msdn.microsoft.com/en-us/library/ms533744(VS.85).aspx
// This might go in support (obviously not with the variable like that)
var encAttr = document.createElement('form').enctype ? 'enctype' : 'encoding';
// This is defined in attributes.js
jQuery.props = {
"for": "htmlFor",
"class": "className",
readonly: "readOnly",
maxlength: "maxLength",
cellspacing: "cellSpacing",
rowspan: "rowSpan",
colspan: "colSpan",
tabindex: "tabIndex",
usemap: "useMap",
frameborder: "frameBorder",
enctype: encAttr,
encoding: encAttr
};
// See if we have something we like
console.log(jQuery.props);