Skip to content

Simplify globalThis export #5506

@NeilFraser

Description

@NeilFraser

Currently (on the goog_module branch) the Blockly.utils.global sets exports.globalThis. As a result, its users invoke:
const {globalThis} = goog.require('Blockly.utils.global');

Since this util only does one thing, wouldn't it be better to set exports, allowing its users to invoke:
const globalThis = goog.require('Blockly.utils.global');

Simplifies the API. Not a breaking change as long as we make the change before the next release.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions