-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX canary] Prevent unknown input types from erroring.
Browsers support various values for `type`, and generally auto-correct to just `"text"` if an unknown type is set via standard HTML. Unfortunately, the same auto-correct behavior does not apply when setting the attribute directly, and in some circumstances throw an error where the type is not valid. Specifically, the following throws an error in IE10: ```javascript var e = document.createElement('input'); e.type = 'search'; ``` However the following HTML would auto-correct to `"text"`: ```html <input type="search"> ```
- Loading branch information
Showing
2 changed files
with
73 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters