Skip to content
This repository was archived by the owner on Mar 20, 2024. It is now read-only.
This repository was archived by the owner on Mar 20, 2024. It is now read-only.

Illegal invocation calling window.getComputedStyle #135

Open
@leifmarcus

Description

@leifmarcus

I included the PrebotModule in an Angular 12 project and I found that the following line breaks, because the call to getComputedStyle is Illegal.

const gcs = this.getWindow().getComputedStyle;

The getComputedStyle object is set here:

getComputedStyle: window.getComputedStyle,

  • I'm submitting a ...
  • bug report
  • feature request
  • Which parts of preboot are affected by this issue?
  • server side
  • client side
  • inline
  • build process
  • docs
  • tests
  • What is the current behavior?
    Currently it throws an error and breaks the swapping of the root application.

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem by

  • What is the expected behavior?
    Should not fail when running in the browser. I would suggest to add .bind(window) to the declaration.

  • Please tell us about your environment:

  • Browser: [Chrome 92.0.4515.159]
  • Language: [TypeScript 4.3 | ES6/7 | ES5 ]
  • OS: [Mac OS X]

image

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