mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 07:08:08 +02:00
Merge pull request #588 from notmasteryet/tree-27
Removing non-standard __defineGetter__ function
This commit is contained in:
commit
c77ce01e35
1 changed files with 4 additions and 10 deletions
14
pdf.js
14
pdf.js
|
@ -55,16 +55,10 @@ function assertWellFormed(cond, msg) {
|
|||
}
|
||||
|
||||
function shadow(obj, prop, value) {
|
||||
try {
|
||||
Object.defineProperty(obj, prop, { value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: false });
|
||||
} catch (e) {
|
||||
obj.__defineGetter__(prop, function shadowDefineGetter() {
|
||||
return value;
|
||||
});
|
||||
}
|
||||
Object.defineProperty(obj, prop, { value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: false });
|
||||
return value;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue