Skip to content

Commit

Permalink
Merge pull request #1244 from bogdanconstantinescu/bugfix/1142-fix-io…
Browse files Browse the repository at this point in the history
…s-14

#1142 - Fix iOS 14.5 - 14.9.9 issue: private class methods are not supported until iOS 15
  • Loading branch information
stephanrauh committed Mar 17, 2022
2 parents e9aa61d + 4a35f71 commit cf3b8f4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions projects/ngx-extended-pdf-viewer/assets/op-chaining-support.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,16 @@ class ClassWithPrivateField {
#privateField;
}

// Does your browser doesn't support private methods?
class ClassWithPrivateMethod {
#privateMethod() {
return true;
}

constructor() {
this.#privateMethod();
}
}
new ClassWithPrivateMethod();

window.supportsOptionalChaining = optionalChaining?.support;

0 comments on commit cf3b8f4

Please sign in to comment.