Skip to content

Commit

Permalink
Add regular expression for page ranges
Browse files Browse the repository at this point in the history
  • Loading branch information
jrandolf-2 committed Jul 6, 2023
1 parent ddabede commit 69580e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2737,13 +2737,15 @@ PDF document represented as a Base64-encoded string.
params: browsingContext.PrintParameters
}

browsingContext.PageRange = text .regexp "^(?:[0-9]+)?(?:-(?:[0-9]+)?)?$"

browsingContext.PrintParameters = {
context: browsingContext.BrowsingContext,
? background: bool .default false,
? margin: browsingContext.PrintMarginParameters,
? orientation: ("portrait" / "landscape") .default "portrait",
? page: browsingContext.PrintPageParameters,
? pageRanges: [*(js-uint / text)],
? pageRanges: [*(js-uint / browsingContext.PageRange )],
? scale: (0.1..2.0) .default 1.0,
? shrinkToFit: bool .default true,
}
Expand Down

0 comments on commit 69580e7

Please sign in to comment.