Prefetch paged.js

This commit is contained in:
2023-04-16 01:56:18 +02:00
parent e62126a83e
commit e1d0baf5fe
8 changed files with 13 additions and 28 deletions

View File

@ -1,17 +1,8 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection.Metadata.Ecma335;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Shapes;
using PdfSharp.Pdf.IO;
using PuppeteerSharp;
using PuppeteerSharp.Media;
using RazorLight;
using Elwig.Helpers;
using Elwig.Windows;
@ -26,6 +17,8 @@ namespace Elwig.Documents {
Browser = await Puppeteer.LaunchAsync(new LaunchOptions {
Headless = true,
ExecutablePath = Chromium,
// paged.js uses XHRs to load styles, so this is needed
Args = new[] { "--allow-file-access-from-files" },
});
evtHandler();
}