Skip to content

Commit 4db3711

Browse files
committed
fixup! [test] silent printing with footer option
1 parent 0c30768 commit 4db3711

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
}

0 commit comments

Comments
 (0)