vue-html-to-paper icon indicating copy to clipboard operation
vue-html-to-paper copied to clipboard

Bug: windowTitle option is broken since 2021-07-01 (> v1.4.3)

Open SeanLMcCullough opened this issue 2 years ago • 0 comments

The option windowTitle and potentially others (?) is broken at commit 6a4f093b656694f882a55ae34e9aeaed259dfcc7.

According to the docs, this option should set the window title. In the current build, this feature is broken.

const options = {
  windowTitle: 'Hello!', // override the window title <-----------------------------------
}

Vue.use(VueHtmlToPaper, options);

This replaced the following:

win.document.write(`
  <html>
    <head>
      <title>${windowTitle}</title>
    </head>
    <body>
      ${element.innerHTML}
    </body>
  </html>
`);

With the following:

win.document.write(`
  <html>
    <head>
      <title>${window.document.title}</title>
    </head>
    <body>
      ${element.innerHTML}
    </body>
  </html>
`);

SeanLMcCullough avatar Jul 01 '22 04:07 SeanLMcCullough