File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -102,11 +102,13 @@ export class Page {
102
102
async render ( options = { } , ...args ) {
103
103
assert . ok ( ! this . isDestroyed && ! this . isDestroying && this . isLoaded ) ;
104
104
105
- if ( isString ( options ) ) {
105
+ let pagePathParamKey = this . renderer . constructor . pagePathParamKey ;
106
+
107
+ if ( isString ( pagePathParamKey ) && isString ( options ) ) {
106
108
let filename = options ;
107
109
108
110
options = isPresent ( args [ 0 ] ) ? args [ 0 ] : { } ;
109
- options . filename = filename ;
111
+ options [ pagePathParamKey ] = filename ;
110
112
}
111
113
112
114
if ( isString ( options . filename ) && ! isString ( options . format ) ) {
Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ export class ChromeRenderer extends Renderer {
17
17
this . _DEFAULT_BOOT_OPTIONS = value ;
18
18
}
19
19
20
+ static get pagePathParamKey ( ) {
21
+ return 'path' ;
22
+ }
23
+
20
24
constructor ( attrs = { } ) {
21
25
super ( attrs ) ;
22
26
Original file line number Diff line number Diff line change @@ -40,6 +40,10 @@ export class PhantomRenderer extends Renderer {
40
40
return denodeify ( request ) ;
41
41
}
42
42
43
+ static get pagePathParamKey ( ) {
44
+ return 'filename' ;
45
+ }
46
+
43
47
constructor ( attrs = { } ) {
44
48
super ( attrs ) ;
45
49
You can’t perform that action at this time.
0 commit comments