MCPcopy Index your code
hub / github.com/EasyWebApp/WebCell / update

Method update

source/WebCell.tsx:118–144  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

116 }
117
118 async update() {
119 const vNode = this.render?.();
120
121 const content = isEmpty(vNode) ? (
122 meta.mode ? (
123 <slot />
124 ) : null
125 ) : (
126 vNode
127 );
128 if (!(content != null)) return;
129
130 if (
131 !meta.transitible ||
132 typeof document.startViewTransition !== 'function'
133 )
134 return this.updateDOM(content);
135
136 const { updateCallbackDone, finished } =
137 document.startViewTransition(() => this.updateDOM(content));
138
139 try {
140 await finished;
141 } catch {
142 return updateCallbackDone;
143 }
144 }
145
146 disconnectedCallback() {
147 const { root } = this,

Callers 1

connectedCallbackMethod · 0.95

Calls 2

updateDOMMethod · 0.95
renderMethod · 0.45

Tested by

no test coverage detected