Skip to content

[css-typed-om-1] Duplicating a CSSVariableReferenceValue is harder than it probably should be #665

Closed
@bzbarsky

Description

@bzbarsky

Say I have a https://drafts.css-houdini.org/css-typed-om-1/#cssvariablereferencevalue and I want to create a "copy" of it. How do I do that?

new CSSVariableReferenceValue(myValue)

throws.

new CSSVariableReferenceValue(myValue.variable, myValue.fallback)

throws if I have no fallback.

new CSSVariableReferenceValue(myValue.variable, myValue.fallback || undefined)

works, but who would think of doing that? ;)

Ideally there would be a constructor taking CSSVariableReferenceValue.

In addition to that, the second (optional) ctor arg should perhaps be nullable and default to null....

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