| 2115 | |
| 2116 | export type {ElementPart}; |
| 2117 | class ElementPart implements Disconnectable { |
| 2118 | readonly type = ELEMENT_PART; |
| 2119 | |
| 2120 | /** @internal */ |
| 2121 | __directive?: Directive; |
| 2122 | |
| 2123 | // This is to ensure that every Part has a _$committedValue |
| 2124 | _$committedValue: undefined; |
| 2125 | |
| 2126 | /** @internal */ |
| 2127 | _$parent!: Disconnectable; |
| 2128 | |
| 2129 | /** @internal */ |
| 2130 | _$disconnectableChildren?: Set<Disconnectable> = undefined; |
| 2131 | |
| 2132 | options: RenderOptions | undefined; |
| 2133 | |
| 2134 | constructor( |
| 2135 | public element: Element, |
| 2136 | parent: Disconnectable, |
| 2137 | options: RenderOptions | undefined |
| 2138 | ) { |
| 2139 | this._$parent = parent; |
| 2140 | this.options = options; |
| 2141 | } |
| 2142 | |
| 2143 | // See comment in Disconnectable interface for why this is a getter |
| 2144 | get _$isConnected() { |
| 2145 | return this._$parent._$isConnected; |
| 2146 | } |
| 2147 | |
| 2148 | _$setValue(value: unknown): void { |
| 2149 | debugLogEvent && |
| 2150 | debugLogEvent({ |
| 2151 | kind: 'commit to element binding', |
| 2152 | element: this.element, |
| 2153 | value, |
| 2154 | options: this.options, |
| 2155 | }); |
| 2156 | resolveDirective(this, value); |
| 2157 | } |
| 2158 | } |
| 2159 | |
| 2160 | /** |
| 2161 | * END USERS SHOULD NOT RELY ON THIS OBJECT. |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…