File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed
test/data/platform_apps/silent_print Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ < html >
2
+ < head >
3
+ </ head >
4
+ < body >
5
+ < script >
6
+ chrome . test . sendMessage ( "Launched" ) ;
7
+ function test0 ( ) {
8
+ nw . Window . get ( ) . print ( { pdf_path : 'output.pdf' , footerString : 'nwtestfooter' } ) ;
9
+ webview = document . getElementById ( 'output' ) ;
10
+ webview . src = 'output.pdf' ;
11
+ webview . addEventListener ( 'contentload' , function ( ) {
12
+ console . log ( "done" ) ;
13
+ chrome . test . sendMessage ( "Loaded" ) ;
14
+ } ) ;
15
+ }
16
+ function test ( ) {
17
+ setTimeout ( test0 , 1000 ) ;
18
+ }
19
+ </ script >
20
+ < p > hello world</ p >
21
+ < button id ="testbtn " onclick ="test() "> test</ button >
22
+ < webview id ="output " partition ="trusted " autosize ="on " minwidth ="576 " minheight ="432 " style ="width:640px; height:480px "> </ webview >
23
+ </ body >
24
+ </ html >
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " nw-demo" ,
3
+ "webview" : {
4
+ "partitions" : [
5
+ {
6
+ "name" : " trusted" ,
7
+ "accessible_resources" : [ " <all_urls>" ]
8
+ }
9
+ ]
10
+ },
11
+ "main" : " index.html"
12
+ }
You can’t perform that action at this time.
0 commit comments