-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Potentially catch input type assignment for older browsers? #773
Comments
Gah, didn't realise that caused an error! I wonder if the best solution would be to have a try { input.type = 'search'; } catch (e) {}
// or
setInputType(input, 'search'); // where setInputType does the above |
That would be perfect! |
+1 for moving to |
Rich-Harris
added a commit
that referenced
this issue
Aug 17, 2017
Rich-Harris
added a commit
that referenced
this issue
Aug 24, 2017
add legacy option, use it for setInputType
Forgot #778 was still open — released as 1.31! |
Woo, thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The new input types are great for progressive enhancement in HTML because if an old browser doesn't support them it just renders a
type="text"
input, which is perfect. Unfortunately, doing this doesn't work in svelte because (at least in IE9) theinput.type = 'search'
assignment will throw an error.If it doesn't make things too filthy it might be nice to try to catch this assignment and fall back to text, but I totally understand if this is considered out of scope and not worth doing.
As always, thank you for everything!
The text was updated successfully, but these errors were encountered: