-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add datalist test #146
Comments
I'm also interested to see, how you do a test. Safari 5.0.3 does seem to have implemented all property interfaces (list on input and options on datalist + display-style on datalist). But they didn't have implemented the UI, so no real feature. |
I found valid test for this:
|
Great stuff, aFarkas! |
Awesome. I'm just going to use |
Fennec (Firefox Mobile), version 2.1.1 have a false positive for datalist support the tag is supported but there is no UI implemented for it... |
Just tried these on testling... test code:var test = require('testling');
test('datalist', function (t) {
var options = 'options' in document.createElement('datalist')
var listoptions = ('list' in document.createElement('input') && 'options' in document.createElement('datalist'))
var globalobj = !!window.HTMLDataListElement;
var shivglobobj = !!(document.createElement('datalist') && window.HTMLDataListElement)
t.log(['basic `"options" in` check :', options ])
t.log(['also checking `"list" in`..:', listoptions ])
t.log(['window.HTMLDataListElement :', globalobj ]);
t.log(['shiv + constructor ^ :', shivglobobj ]);
t.end();
}); results:
Demo page:also
|
So.. summary...
And Modernizr technically already has a test for this... What this means is that we'll augment the |
Reported the safari false positive here: http://webk.it/74252 |
http://demo.agektmr.com/datalist/ it's in canary now. but fails our feature detect. i'm working with the chrome engineer to resolve that. :) |
I'd like to know whether the browser has native
datalist
support. I'm not exactly sure how to represent this as a Modernizr test, but the following works with jQuery:Non-supporting browsers will ignore the attribute or leave it as a string. Supporting browsers will return the actual
HTMLDataListElement
object.I tried emulating this with
document.createElement
but couldn't get the supporting browsers (Opera 9.5+) to make the link.The text was updated successfully, but these errors were encountered: