23 lines
764 B
TypeScript
23 lines
764 B
TypeScript
// Polyfill for Uint8Array.prototype.toHex — required by pdfjs-dist v5+.
|
|
// This method (part of TC39 proposal) is only natively available in Chrome 140+
|
|
// and is not yet supported by Android WebViews used in Capacitor apps.
|
|
if (!('toHex' in Uint8Array.prototype)) {
|
|
Object.defineProperty(Uint8Array.prototype, 'toHex', {
|
|
value(this: Uint8Array): string {
|
|
return Array.from(this)
|
|
.map(byte => byte.toString(16).padStart(2, '0'))
|
|
.join('');
|
|
},
|
|
writable: true,
|
|
configurable: true,
|
|
enumerable: false
|
|
});
|
|
}
|
|
|
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
|
|
import { AppModule } from './app/app.module';
|
|
|
|
platformBrowserDynamic().bootstrapModule(AppModule)
|
|
.catch(err => console.log(err));
|