MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / _applyXmlAttribute

Function _applyXmlAttribute

packages/core/ui/core/view-base/index.ts:1402–1412  ·  view source on GitHub ↗

* @deprecated * * This used to be the way to set attribute values in early {N} versions. * Now attributes are expected to be set as plain properties on the view instances.

(attribute: string, value: string)

Source from the content-addressed store, hash-verified

1400 * Now attributes are expected to be set as plain properties on the view instances.
1401 */
1402 public _applyXmlAttribute(attribute: string, value: string): boolean {
1403 console.log('ViewBase._applyXmlAttribute(...) is deprecated; set attributes as plain properties instead');
1404
1405 if (attribute === 'style' || attribute === 'rows' || attribute === 'columns' || attribute === 'fontAttributes') {
1406 this[attribute] = value;
1407
1408 return true;
1409 }
1410
1411 return false;
1412 }
1413
1414 public setInlineStyle(style: string): void {
1415 if (typeof style !== 'string') {

Callers

nothing calls this directly

Calls 1

logMethod · 0.45

Tested by

no test coverage detected