Attribute.opAssign

Assign a new value to this attribute. Retains the original key.

Parameters

newValue string[]

Value assigned to the attribute. i-strings are supported. The value can also be passed as an array of strings, in which case they will be joined with a space. That comes handy for CSS classes.

Return Value

Type: Attribute

The attribute.

Examples

auto a = Attribute("name");
a = i"1+2 is $(1+2)";
assert(a == `name="1+2 is 3"`);

Meta