Skip to content

Problem to mock 'document' and 'window' for web worker #1

Description

@jandetlefsen

Hello, thanks for making this version and keeping it updated. I'm trying to get pdfmake running in a web worker. Since the library has known issues with web worker i need to provide a dummy constructor for document and window as described here. I have problems getting this to work and i wonder if it's because i'm using the import from ES6 way to include libraries with the browserify version of PDF make. Any ideas?

this is from my code:

var document = { 'createElementNS': function(){ return {} } }
var window = this

import pdfMake from 'pdfmake-browserify'
import nda from '../../pdf_templates/nda'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions