Skip to content

Why are only same-origin link elements supported? #90

Open
@jmlee2k

Description

@jmlee2k

Hello,

Thank you for this incredible polyfill!

As the title says, I'm just wondering why only same-origin link elements are supported?

For various reasons, we need to load some of our css from a different origin - I've removed the origin check here:

https://github.com/GoogleChromeLabs/container-query-polyfill/blob/main/src/engine.ts#L596

and it seems to work without issue, so I'm wondering if there is another reason for limiting it to same-origin links.

If the concern is simply to limit the scope, I'd be happy to make a PR allowing you to pass a function to whitelist origins or similar.

I'm aware that this is in maintenance mode, but I thought I'd ask anyways!

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