Skip to content

[scoped-custom-element-registry] Broken on Safari 18.4 #609

@MariusVatasoiu

Description

@MariusVatasoiu

Description

Error thrown on Safari 18.4 at this line:

const shadowRoot = nativeAttachShadow.apply(this, arguments);

Example

Steps to reproduce

import "https://esm.sh/@webcomponents/scoped-custom-element-registry@0.0.9"
import { LitElement, html } from "https://esm.sh/lit"
import { ScopedElementsMixin } from "https://esm.sh/@open-wc/scoped-elements/html-element.js"

class Child extends LitElement {
  render() {
    return html`child`
  }
}

class MyComponent extends ScopedElementsMixin(LitElement) {
  static scopedElements = {
    "my-child": Child,
  }
  render() {
    return html`<my-child></my-child>`
  }
}

window.customElements.define("my-component", MyComponent)
<my-component></my-component>

Repro: playground

Expected behavior

No error is thrown

Actual behavior

Error is thrown

Version

@webcomponents/scoped-custom-element-registry@0.0.9

Browsers affected

  • Chrome
  • Firefox
  • Edge
  • Safari 18.4 (beta)
  • IE 11

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