Skip to content

customElements.get/define 未兜底 #94

@xiongying1012

Description

@xiongying1012

if (!customElements.get(tag)) { customElements.define(tag, getWrapperClass(target, style)); }
不支持 customElements 的浏览器引入组件直接白屏阻塞了...
前提:
不想加载pollyfills
判断支持性之后再引入也可以解决,但不想失去按需的写法

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