fix(core): allow null value for renderer setElement(…) (#17065)

Using Renderer’s setElementAttribute or setElementStyle with a null or undefined value removes the
corresponding attribute or style. The argument type should allow this when using strictNullChecks.

Closes #13686

PR Close #17065
This commit is contained in:
Manduro
2017-05-27 13:48:59 +02:00
committed by Miško Hevery
parent ea20ae63d0
commit ff15043e48
3 changed files with 6 additions and 6 deletions

View File

@ -73,7 +73,7 @@ export abstract class Renderer {
abstract setElementProperty(renderElement: any, propertyName: string, propertyValue: any): void;
abstract setElementAttribute(renderElement: any, attributeName: string, attributeValue: string):
abstract setElementAttribute(renderElement: any, attributeName: string, attributeValue?: string):
void;
/**
@ -84,7 +84,7 @@ export abstract class Renderer {
abstract setElementClass(renderElement: any, className: string, isAdd: boolean): void;
abstract setElementStyle(renderElement: any, styleName: string, styleValue: string): void;
abstract setElementStyle(renderElement: any, styleName: string, styleValue?: string): void;
abstract invokeElementMethod(renderElement: any, methodName: string, args?: any[]): void;