Skip to content

Commit 680a551

Browse files
committed
#255: expose puppeteersharp launch options
1 parent 074929d commit 680a551

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

src/Plotly.NET.ImageExport/PuppeteerSharpRenderer.fs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ open System.Text
99
open System.Text.RegularExpressions
1010
open DynamicObj
1111

12+
module PuppeteerSharpRendererOptions =
13+
14+
let mutable launchOptions = LaunchOptions()
15+
16+
launchOptions.Timeout <- 60000
17+
1218
type PuppeteerSharpRenderer() =
1319

1420
/// adapted from the original C# implementation by @ilyalatt : https://github.com/ilyalatt/Plotly.NET.PuppeteerRenderer
@@ -76,9 +82,10 @@ type PuppeteerSharpRenderer() =
7682

7783
let! revision = browserFetcher.DownloadAsync() |> Async.AwaitTask
7884

79-
let launchOptions = LaunchOptions()
85+
let launchOptions =
86+
PuppeteerSharpRendererOptions.launchOptions
87+
8088
launchOptions.ExecutablePath <- revision.ExecutablePath
81-
launchOptions.Timeout <- 60000
8289

8390
return! Puppeteer.LaunchAsync(launchOptions) |> Async.AwaitTask
8491
}

0 commit comments

Comments
 (0)