mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Remove the input.type
polyfill
This is only relevant for browsers that we don't intend to support with PDF.js version `2.0`.
This commit is contained in:
parent
cf88b7b212
commit
6af45052c5
1 changed files with 0 additions and 25 deletions
|
@ -111,31 +111,6 @@ PDFJS.compatibilityChecked = true;
|
|||
});
|
||||
})();
|
||||
|
||||
// Provides `input.type = 'type'` runtime failure protection.
|
||||
// Support: IE9,10.
|
||||
(function checkInputTypeNumberAssign() {
|
||||
if (!hasDOM) {
|
||||
return;
|
||||
}
|
||||
var el = document.createElement('input');
|
||||
try {
|
||||
el.type = 'number';
|
||||
} catch (ex) {
|
||||
var inputProto = el.constructor.prototype;
|
||||
var typeProperty = Object.getOwnPropertyDescriptor(inputProto, 'type');
|
||||
Object.defineProperty(inputProto, 'type', {
|
||||
get() {
|
||||
return typeProperty.get.call(this);
|
||||
},
|
||||
set(value) {
|
||||
typeProperty.set.call(this, value === 'number' ? 'text' : value);
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
});
|
||||
}
|
||||
})();
|
||||
|
||||
// Provides correct document.readyState value for legacy browsers.
|
||||
// Support: IE9,10.
|
||||
(function checkDocumentReadyState() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue