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

Method constructor

packages/core/ui/styling/style/index.ts:41–50  ·  view source on GitHub ↗
(ownerView: ViewBase | WeakRef<ViewBase>)

Source from the content-addressed store, hash-verified

39 private scopedCssVariables = new Map<string, string>();
40
41 constructor(ownerView: ViewBase | WeakRef<ViewBase>) {
42 super();
43
44 // HACK: Could not find better way for cross platform WeakRef type checking.
45 if (ownerView.constructor.toString().indexOf('[native code]') !== -1 || ownerView.toString() == '[object WeakRef]') {
46 this.viewRef = <WeakRef<ViewBase>>ownerView;
47 } else {
48 this.viewRef = new WeakRef(<ViewBase>ownerView);
49 }
50 }
51
52 public setScopedCssVariable(varName: string, value: string): void {
53 this.scopedCssVariables.set(varName, value);

Callers

nothing calls this directly

Calls 2

indexOfMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected