Skip to content
This repository was archived by the owner on Jan 4, 2021. It is now read-only.
This repository was archived by the owner on Jan 4, 2021. It is now read-only.

XMLHttpRequest is undefined using MyScript in a node application #21

@gruckion

Description

@gruckion

When attempting to import "myscript"; to use in a REST API the XMLHttpRequest instance in undefined.

Assumption was made:

// We are writing some browser module here so the no import found should be ignored
// eslint-disable-next-line no-undef
var request = new XMLHttpRequest();

In order to fix this the dependencies needs to be introduced.

var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions