parent
a2f3f4550d
commit
db55e86e91
|
@ -596,8 +596,9 @@ export function elementAttribute(index: number, attrName: string, value: any): v
|
|||
element.native.removeAttribute(attrName);
|
||||
} else {
|
||||
(renderer as ProceduralRenderer3).setAttribute ?
|
||||
(renderer as ProceduralRenderer3).setAttribute(element.native, attrName, value) :
|
||||
element.native.setAttribute(attrName, value);
|
||||
(renderer as ProceduralRenderer3)
|
||||
.setAttribute(element.native, attrName, stringify(value)) :
|
||||
element.native.setAttribute(attrName, stringify(value));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,10 +104,11 @@ export function stringifyElement(el: any /** TODO #9100 */): string {
|
|||
for (let i = 0; i < keys.length; i++) {
|
||||
const key = keys[i];
|
||||
const attValue = attributeMap.get(key);
|
||||
const lowerCaseKey = key.toLowerCase();
|
||||
if (typeof attValue !== 'string') {
|
||||
result += ` ${key}`;
|
||||
result += ` ${lowerCaseKey}`;
|
||||
} else {
|
||||
result += ` ${key}="${attValue}"`;
|
||||
result += ` ${lowerCaseKey}="${attValue}"`;
|
||||
}
|
||||
}
|
||||
result += '>';
|
||||
|
|
Loading…
Reference in New Issue