Inject script into Worker

Asked

Viewed 33 times

2

Hello, I have the following javascript class

class MinhaClasse {
    static list() {
        return fetch('/api/endPoint', {
            method: 'GET', 
            headers: {
                'Authorization': Auth.getBasic()
            }
        })
    } 
}

When inside the web worker I call MinhaClasse she is undefined! how can I inject her into the worker?

1 answer

0


Browser other questions tagged

You are not signed in. Login or sign up in order to post.