You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to use this in Safari 12.3, I get the following error: [Error] TypeError: The HTMLInputElement.list getter can only be used on instances of HTMLInputElement.
It's pointing to this line constructor.prototype.list === undefined.
// Emulate the two properties regarding the datalist and input elements
// list property / https://developer.mozilla.org/en/docs/Web/API/HTMLInputElement
(function(constructor) {
if (
constructor &&
constructor.prototype &&
constructor.prototype.list === undefined
) {
The solution was to use WKWebView instead of UIWebView since it supports datalist. However, it's to note that this polyfill could be extended to work for all versions of Safari.
The text was updated successfully, but these errors were encountered:
mfranzke
changed the title
When trying to use this in Safari 12.3, I get the following error: [Error] TypeError: The HTMLInputElement.list getter can only be used on instances of HTMLInputElement.
When trying to use this in Safari 12.3, I get the following error
Jun 13, 2019
To my understanding, this is mainly about using a datalist element within a HTML website embedded in a webview within an app, in which the polyfill is included as well, isn't it?
And the solution that you're suggesting is about mentioning within the README that WKWebView should get used instead of UIWebView, right?
For users that have problems with datalist in an embedded webview within an app, they should be using WKWebView instead of UIWebView. I just wanted to inform them of the support newer HTML website shave.
When trying to use this in Safari 12.3, I get the following error:
[Error] TypeError: The HTMLInputElement.list getter can only be used on instances of HTMLInputElement
.It's pointing to this line
constructor.prototype.list === undefined
.The solution was to use
WKWebView
instead ofUIWebView
since it supports datalist. However, it's to note that this polyfill could be extended to work for all versions of Safari.Originally posted by @jscho13 in #47 (comment)
The text was updated successfully, but these errors were encountered: