Skip to content

Support for Lighting Web Components security restrictions (LWS) #979

@nwcm

Description

@nwcm

The LWC engine provides "extra" security measures

LWS confines them to a sandbox where they access a virtual copy of the global window object.

Is it possible to support

(function (global) {
  global = global || self;
  global.myFunction = function () {};
})(this);

context
additional context

Happy to contribution, this may be an issue with the https://github.com/kurkle/color#readme which is included in the umd bundle for chartjs.

seems this is the conflicting spot

https://github.com/chartjs/chartjs-plugin-annotation/blob/1e95744fb98e6fe9426f8b6a7bd17b1fcdee2f42/src/annotation.js#L53C6-L59C10

  const value = annotationOptions[key];
        if (isObject(value)) {
          value.id = key;
          annotations.push(value);
        }
      });
    }

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