code
stringlengths
24
2.07M
docstring
stringlengths
25
85.3k
func_name
stringlengths
1
92
language
stringclasses
1 value
repo
stringlengths
5
64
path
stringlengths
4
172
url
stringlengths
44
218
license
stringclasses
7 values
function abortTaskSoft(task) { var request = this; var boundary = task.blockedBoundary; var segment = task.blockedSegment; segment.status = ABORTED; finishedTask(request, boundary, segment); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
abortTaskSoft
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function abortTask(task, request, reason) { var boundary = task.blockedBoundary; var segment = task.blockedSegment; segment.status = ABORTED; if (boundary === null) { request.allPendingTasks--; if (request.status !== CLOSED) { request.status = CLOSED; if (request.destination !== null) { close(request.destination); } } } else { boundary.pendingTasks--; if (!boundary.forceClientRender) { boundary.forceClientRender = true; var _error = reason === void 0 ? new Error("The render was aborted by the server without a reason.") : reason; boundary.errorDigest = request.onError(_error); { var errorPrefix = "The server did not finish this Suspense boundary: "; if (_error && typeof _error.message === "string") { _error = errorPrefix + _error.message; } else { _error = errorPrefix + String(_error); } var previousTaskInDev = currentTaskInDEV; currentTaskInDEV = task; try { captureBoundaryErrorDetailsDev(boundary, _error); } finally { currentTaskInDEV = previousTaskInDev; } } if (boundary.parentFlushed) { request.clientRenderedBoundaries.push(boundary); } } boundary.fallbackAbortableTasks.forEach(function(fallbackTask) { return abortTask(fallbackTask, request, reason); }); boundary.fallbackAbortableTasks.clear(); request.allPendingTasks--; if (request.allPendingTasks === 0) { var onAllReady = request.onAllReady; onAllReady(); } } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
abortTask
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function queueCompletedSegment(boundary, segment) { if (segment.chunks.length === 0 && segment.children.length === 1 && segment.children[0].boundary === null) { var childSegment = segment.children[0]; childSegment.id = segment.id; childSegment.parentFlushed = true; if (childSegment.status === COMPLETED) { queueCompletedSegment(boundary, childSegment); } } else { var completedSegments = boundary.completedSegments; completedSegments.push(segment); } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
queueCompletedSegment
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function finishedTask(request, boundary, segment) { if (boundary === null) { if (segment.parentFlushed) { if (request.completedRootSegment !== null) { throw new Error("There can only be one root segment. This is a bug in React."); } request.completedRootSegment = segment; } request.pendingRootTasks--; if (request.pendingRootTasks === 0) { request.onShellError = noop$1; var onShellReady = request.onShellReady; onShellReady(); } } else { boundary.pendingTasks--; if (boundary.forceClientRender) ; else if (boundary.pendingTasks === 0) { if (segment.parentFlushed) { if (segment.status === COMPLETED) { queueCompletedSegment(boundary, segment); } } if (boundary.parentFlushed) { request.completedBoundaries.push(boundary); } boundary.fallbackAbortableTasks.forEach(abortTaskSoft, request); boundary.fallbackAbortableTasks.clear(); } else { if (segment.parentFlushed) { if (segment.status === COMPLETED) { queueCompletedSegment(boundary, segment); var completedSegments = boundary.completedSegments; if (completedSegments.length === 1) { if (boundary.parentFlushed) { request.partialBoundaries.push(boundary); } } } } } } request.allPendingTasks--; if (request.allPendingTasks === 0) { var onAllReady = request.onAllReady; onAllReady(); } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
finishedTask
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function retryTask(request, task) { var segment = task.blockedSegment; if (segment.status !== PENDING) { return; } switchContext(task.context); var prevTaskInDEV = null; { prevTaskInDEV = currentTaskInDEV; currentTaskInDEV = task; } try { renderNodeDestructive(request, task, task.node); pushSegmentFinale$1(segment.chunks, request.responseState, segment.lastPushedText, segment.textEmbedded); task.abortSet.delete(task); segment.status = COMPLETED; finishedTask(request, task.blockedBoundary, segment); } catch (x) { resetHooksState(); if (typeof x === "object" && x !== null && typeof x.then === "function") { var ping = task.ping; x.then(ping, ping); } else { task.abortSet.delete(task); segment.status = ERRORED; erroredTask(request, task.blockedBoundary, segment, x); } } finally { { currentTaskInDEV = prevTaskInDEV; } } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
retryTask
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function performWork(request) { if (request.status === CLOSED) { return; } var prevContext = getActiveContext(); var prevDispatcher = ReactCurrentDispatcher$1.current; ReactCurrentDispatcher$1.current = Dispatcher; var prevGetCurrentStackImpl; { prevGetCurrentStackImpl = ReactDebugCurrentFrame$1.getCurrentStack; ReactDebugCurrentFrame$1.getCurrentStack = getCurrentStackInDEV; } var prevResponseState = currentResponseState; setCurrentResponseState(request.responseState); try { var pingedTasks = request.pingedTasks; var i; for (i = 0; i < pingedTasks.length; i++) { var task = pingedTasks[i]; retryTask(request, task); } pingedTasks.splice(0, i); if (request.destination !== null) { flushCompletedQueues(request, request.destination); } } catch (error2) { logRecoverableError(request, error2); fatalError(request, error2); } finally { setCurrentResponseState(prevResponseState); ReactCurrentDispatcher$1.current = prevDispatcher; { ReactDebugCurrentFrame$1.getCurrentStack = prevGetCurrentStackImpl; } if (prevDispatcher === Dispatcher) { switchContext(prevContext); } } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
performWork
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function flushSubtree(request, destination, segment) { segment.parentFlushed = true; switch (segment.status) { case PENDING: { var segmentID = segment.id = request.nextSegmentId++; segment.lastPushedText = false; segment.textEmbedded = false; return writePlaceholder(destination, request.responseState, segmentID); } case COMPLETED: { segment.status = FLUSHED; var r = true; var chunks = segment.chunks; var chunkIdx = 0; var children = segment.children; for (var childIdx = 0; childIdx < children.length; childIdx++) { var nextChild = children[childIdx]; for (; chunkIdx < nextChild.index; chunkIdx++) { writeChunk(destination, chunks[chunkIdx]); } r = flushSegment(request, destination, nextChild); } for (; chunkIdx < chunks.length - 1; chunkIdx++) { writeChunk(destination, chunks[chunkIdx]); } if (chunkIdx < chunks.length) { r = writeChunkAndReturn(destination, chunks[chunkIdx]); } return r; } default: { throw new Error("Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React."); } } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
flushSubtree
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function flushSegment(request, destination, segment) { var boundary = segment.boundary; if (boundary === null) { return flushSubtree(request, destination, segment); } boundary.parentFlushed = true; if (boundary.forceClientRender) { writeStartClientRenderedSuspenseBoundary$1(destination, request.responseState, boundary.errorDigest, boundary.errorMessage, boundary.errorComponentStack); flushSubtree(request, destination, segment); return writeEndClientRenderedSuspenseBoundary$1(destination, request.responseState); } else if (boundary.pendingTasks > 0) { boundary.rootSegmentID = request.nextSegmentId++; if (boundary.completedSegments.length > 0) { request.partialBoundaries.push(boundary); } var id = boundary.id = assignSuspenseBoundaryID(request.responseState); writeStartPendingSuspenseBoundary(destination, request.responseState, id); flushSubtree(request, destination, segment); return writeEndPendingSuspenseBoundary(destination, request.responseState); } else if (boundary.byteSize > request.progressiveChunkSize) { boundary.rootSegmentID = request.nextSegmentId++; request.completedBoundaries.push(boundary); writeStartPendingSuspenseBoundary(destination, request.responseState, boundary.id); flushSubtree(request, destination, segment); return writeEndPendingSuspenseBoundary(destination, request.responseState); } else { writeStartCompletedSuspenseBoundary$1(destination, request.responseState); var completedSegments = boundary.completedSegments; if (completedSegments.length !== 1) { throw new Error("A previously unvisited boundary must have exactly one root segment. This is a bug in React."); } var contentSegment = completedSegments[0]; flushSegment(request, destination, contentSegment); return writeEndCompletedSuspenseBoundary$1(destination, request.responseState); } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
flushSegment
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function flushClientRenderedBoundary(request, destination, boundary) { return writeClientRenderBoundaryInstruction(destination, request.responseState, boundary.id, boundary.errorDigest, boundary.errorMessage, boundary.errorComponentStack); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
flushClientRenderedBoundary
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function flushSegmentContainer(request, destination, segment) { writeStartSegment(destination, request.responseState, segment.formatContext, segment.id); flushSegment(request, destination, segment); return writeEndSegment(destination, segment.formatContext); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
flushSegmentContainer
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function flushCompletedBoundary(request, destination, boundary) { var completedSegments = boundary.completedSegments; var i = 0; for (; i < completedSegments.length; i++) { var segment = completedSegments[i]; flushPartiallyCompletedSegment(request, destination, boundary, segment); } completedSegments.length = 0; return writeCompletedBoundaryInstruction(destination, request.responseState, boundary.id, boundary.rootSegmentID); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
flushCompletedBoundary
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function flushPartialBoundary(request, destination, boundary) { var completedSegments = boundary.completedSegments; var i = 0; for (; i < completedSegments.length; i++) { var segment = completedSegments[i]; if (!flushPartiallyCompletedSegment(request, destination, boundary, segment)) { i++; completedSegments.splice(0, i); return false; } } completedSegments.splice(0, i); return true; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
flushPartialBoundary
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function flushPartiallyCompletedSegment(request, destination, boundary, segment) { if (segment.status === FLUSHED) { return true; } var segmentID = segment.id; if (segmentID === -1) { var rootSegmentID = segment.id = boundary.rootSegmentID; if (rootSegmentID === -1) { throw new Error("A root segment ID must have been assigned by now. This is a bug in React."); } return flushSegmentContainer(request, destination, segment); } else { flushSegmentContainer(request, destination, segment); return writeCompletedSegmentInstruction(destination, request.responseState, segmentID); } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
flushPartiallyCompletedSegment
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function flushCompletedQueues(request, destination) { try { var completedRootSegment = request.completedRootSegment; if (completedRootSegment !== null && request.pendingRootTasks === 0) { flushSegment(request, destination, completedRootSegment); request.completedRootSegment = null; writeCompletedRoot(destination, request.responseState); } var clientRenderedBoundaries = request.clientRenderedBoundaries; var i; for (i = 0; i < clientRenderedBoundaries.length; i++) { var boundary = clientRenderedBoundaries[i]; if (!flushClientRenderedBoundary(request, destination, boundary)) { request.destination = null; i++; clientRenderedBoundaries.splice(0, i); return; } } clientRenderedBoundaries.splice(0, i); var completedBoundaries = request.completedBoundaries; for (i = 0; i < completedBoundaries.length; i++) { var _boundary = completedBoundaries[i]; if (!flushCompletedBoundary(request, destination, _boundary)) { request.destination = null; i++; completedBoundaries.splice(0, i); return; } } completedBoundaries.splice(0, i); completeWriting(destination); beginWriting(destination); var partialBoundaries = request.partialBoundaries; for (i = 0; i < partialBoundaries.length; i++) { var _boundary2 = partialBoundaries[i]; if (!flushPartialBoundary(request, destination, _boundary2)) { request.destination = null; i++; partialBoundaries.splice(0, i); return; } } partialBoundaries.splice(0, i); var largeBoundaries = request.completedBoundaries; for (i = 0; i < largeBoundaries.length; i++) { var _boundary3 = largeBoundaries[i]; if (!flushCompletedBoundary(request, destination, _boundary3)) { request.destination = null; i++; largeBoundaries.splice(0, i); return; } } largeBoundaries.splice(0, i); } finally { if (request.allPendingTasks === 0 && request.pingedTasks.length === 0 && request.clientRenderedBoundaries.length === 0 && request.completedBoundaries.length === 0) { { if (request.abortableTasks.size !== 0) { error("There was still abortable task at the root when we closed. This is a bug in React."); } } close(destination); } } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
flushCompletedQueues
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function startWork(request) { scheduleWork(function() { return performWork(request); }); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
startWork
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function startFlowing(request, destination) { if (request.status === CLOSING) { request.status = CLOSED; closeWithError(destination, request.fatalError); return; } if (request.status === CLOSED) { return; } if (request.destination !== null) { return; } request.destination = destination; try { flushCompletedQueues(request, destination); } catch (error2) { logRecoverableError(request, error2); fatalError(request, error2); } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
startFlowing
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function abort(request, reason) { try { var abortableTasks = request.abortableTasks; abortableTasks.forEach(function(task) { return abortTask(task, request, reason); }); abortableTasks.clear(); if (request.destination !== null) { flushCompletedQueues(request, request.destination); } } catch (error2) { logRecoverableError(request, error2); fatalError(request, error2); } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
abort
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function renderToStringImpl(children, options, generateStaticMarkup, abortReason) { var didFatal = false; var fatalError2 = null; var result = ""; var destination = { push: function(chunk) { if (chunk !== null) { result += chunk; } return true; }, destroy: function(error2) { didFatal = true; fatalError2 = error2; } }; var readyToStream = false; function onShellReady() { readyToStream = true; } var request = createRequest(children, createResponseState$1(generateStaticMarkup, options ? options.identifierPrefix : void 0), createRootFormatContext(), Infinity, onError, void 0, onShellReady, void 0, void 0); startWork(request); abort(request, abortReason); startFlowing(request, destination); if (didFatal) { throw fatalError2; } if (!readyToStream) { throw new Error("A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition."); } return result; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
renderToStringImpl
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function onShellReady() { readyToStream = true; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
onShellReady
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function renderToString(children, options) { return renderToStringImpl(children, options, false, 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
renderToString
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function renderToStaticMarkup(children, options) { return renderToStringImpl(children, options, true, 'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
renderToStaticMarkup
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function renderToNodeStream() { throw new Error("ReactDOMServer.renderToNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToString() instead."); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
renderToNodeStream
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function renderToStaticNodeStream() { throw new Error("ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToStaticMarkup() instead."); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
renderToStaticNodeStream
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function warn(format) { { { for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } printWarning("warn", format, args); } } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
warn
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function error(format) { { { for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { args[_key2 - 1] = arguments[_key2]; } printWarning("error", format, args); } } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
error
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function printWarning(level, format, args) { { var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame; var stack = ReactDebugCurrentFrame2.getStackAddendum(); if (stack !== "") { format += "%s"; args = args.concat([stack]); } var argsWithFormat = args.map(function(item) { return String(item); }); argsWithFormat.unshift("Warning: " + format); Function.prototype.apply.call(console[level], console, argsWithFormat); } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
printWarning
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function beginWriting(destination) { currentView = new Uint8Array(VIEW_SIZE); writtenBytes = 0; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
beginWriting
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function writeChunk(destination, chunk) { if (chunk.length === 0) { return; } if (chunk.length > VIEW_SIZE) { if (writtenBytes > 0) { destination.enqueue(new Uint8Array(currentView.buffer, 0, writtenBytes)); currentView = new Uint8Array(VIEW_SIZE); writtenBytes = 0; } destination.enqueue(chunk); return; } var bytesToWrite = chunk; var allowableBytes = currentView.length - writtenBytes; if (allowableBytes < bytesToWrite.length) { if (allowableBytes === 0) { destination.enqueue(currentView); } else { currentView.set(bytesToWrite.subarray(0, allowableBytes), writtenBytes); destination.enqueue(currentView); bytesToWrite = bytesToWrite.subarray(allowableBytes); } currentView = new Uint8Array(VIEW_SIZE); writtenBytes = 0; } currentView.set(bytesToWrite, writtenBytes); writtenBytes += bytesToWrite.length; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
writeChunk
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function writeChunkAndReturn(destination, chunk) { writeChunk(destination, chunk); return true; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
writeChunkAndReturn
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function completeWriting(destination) { if (currentView && writtenBytes > 0) { destination.enqueue(new Uint8Array(currentView.buffer, 0, writtenBytes)); currentView = null; writtenBytes = 0; } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
completeWriting
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function stringToChunk(content) { return textEncoder.encode(content); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
stringToChunk
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function stringToPrecomputedChunk(content) { return textEncoder.encode(content); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
stringToPrecomputedChunk
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function closeWithError(destination, error2) { if (typeof destination.error === "function") { destination.error(error2); } else { destination.close(); } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
closeWithError
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function typeName(value) { { var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag; var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object"; return type; } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
typeName
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function willCoercionThrow(value) { { try { testStringCoercion(value); return false; } catch (e) { return true; } } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
willCoercionThrow
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function testStringCoercion(value) { return "" + value; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
testStringCoercion
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function checkAttributeStringCoercion(value, attributeName) { { if (willCoercionThrow(value)) { error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.", attributeName, typeName(value)); return testStringCoercion(value); } } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
checkAttributeStringCoercion
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function checkCSSPropertyStringCoercion(value, propName) { { if (willCoercionThrow(value)) { error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.", propName, typeName(value)); return testStringCoercion(value); } } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
checkCSSPropertyStringCoercion
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function checkHtmlStringCoercion(value) { { if (willCoercionThrow(value)) { error("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value)); return testStringCoercion(value); } } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
checkHtmlStringCoercion
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function isAttributeNameSafe(attributeName) { if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) { return true; } if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) { return false; } if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { validatedAttributeNameCache[attributeName] = true; return true; } illegalAttributeNameCache[attributeName] = true; { error("Invalid attribute name: `%s`", attributeName); } return false; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
isAttributeNameSafe
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) { if (propertyInfo !== null && propertyInfo.type === RESERVED) { return false; } switch (typeof value) { case "function": case "symbol": return true; case "boolean": { if (isCustomComponentTag) { return false; } if (propertyInfo !== null) { return !propertyInfo.acceptsBooleans; } else { var prefix2 = name.toLowerCase().slice(0, 5); return prefix2 !== "data-" && prefix2 !== "aria-"; } } default: return false; } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
shouldRemoveAttributeWithWarning
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function getPropertyInfo(name) { return properties.hasOwnProperty(name) ? properties[name] : null; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
getPropertyInfo
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL2, removeEmptyString) { this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN; this.attributeName = attributeName; this.attributeNamespace = attributeNamespace; this.mustUseProperty = mustUseProperty; this.propertyName = name; this.type = type; this.sanitizeURL = sanitizeURL2; this.removeEmptyString = removeEmptyString; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
PropertyInfoRecord
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
capitalize = function(token) { return token[1].toUpperCase(); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
capitalize
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function prefixKey(prefix2, key) { return prefix2 + key.charAt(0).toUpperCase() + key.substring(1); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
prefixKey
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function checkControlledValueProps(tagName, props) { { if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) { error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."); } if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) { error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`."); } } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
checkControlledValueProps
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function isCustomComponent(tagName, props) { if (tagName.indexOf("-") === -1) { return typeof props.is === "string"; } switch (tagName) { case "annotation-xml": case "color-profile": case "font-face": case "font-face-src": case "font-face-uri": case "font-face-format": case "font-face-name": case "missing-glyph": return false; default: return true; } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
isCustomComponent
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function validateProperty(tagName, name) { { if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name]) { return true; } if (rARIACamel.test(name)) { var ariaName = "aria-" + name.slice(4).toLowerCase(); var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; if (correctName == null) { error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.", name); warnedProperties[name] = true; return true; } if (name !== correctName) { error("Invalid ARIA attribute `%s`. Did you mean `%s`?", name, correctName); warnedProperties[name] = true; return true; } } if (rARIA.test(name)) { var lowerCasedName = name.toLowerCase(); var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; if (standardName == null) { warnedProperties[name] = true; return false; } if (name !== standardName) { error("Unknown ARIA attribute `%s`. Did you mean `%s`?", name, standardName); warnedProperties[name] = true; return true; } } } return true; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
validateProperty
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function warnInvalidARIAProps(type, props) { { var invalidProps = []; for (var key in props) { var isValid = validateProperty(type, key); if (!isValid) { invalidProps.push(key); } } var unknownPropString = invalidProps.map(function(prop) { return "`" + prop + "`"; }).join(", "); if (invalidProps.length === 1) { error("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props", unknownPropString, type); } else if (invalidProps.length > 1) { error("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props", unknownPropString, type); } } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
warnInvalidARIAProps
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function validateProperties(type, props) { if (isCustomComponent(type, props)) { return; } warnInvalidARIAProps(type, props); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
validateProperties
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function validateProperties$1(type, props) { { if (type !== "input" && type !== "textarea" && type !== "select") { return; } if (props != null && props.value === null && !didWarnValueNull) { didWarnValueNull = true; if (type === "select" && props.multiple) { error("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.", type); } else { error("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.", type); } } } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
validateProperties$1
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
warnUnknownProperties = function(type, props, eventRegistry) { { var unknownProps = []; for (var key in props) { var isValid = validateProperty$1(type, key, props[key], eventRegistry); if (!isValid) { unknownProps.push(key); } } var unknownPropString = unknownProps.map(function(prop) { return "`" + prop + "`"; }).join(", "); if (unknownProps.length === 1) { error("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior ", unknownPropString, type); } else if (unknownProps.length > 1) { error("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://reactjs.org/link/attribute-behavior ", unknownPropString, type); } } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
warnUnknownProperties
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function validateProperties$2(type, props, eventRegistry) { if (isCustomComponent(type, props)) { return; } warnUnknownProperties(type, props, eventRegistry); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
validateProperties$2
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
camelize = function(string) { return string.replace(hyphenPattern, function(_, character) { return character.toUpperCase(); }); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
camelize
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
warnHyphenatedStyleName = function(name) { if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { return; } warnedStyleNames[name] = true; error( "Unsupported style property %s. Did you mean %s?", name, // As Andi Smith suggests // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix // is converted to lowercase `ms`. camelize(name.replace(msPattern, "ms-")) ); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
warnHyphenatedStyleName
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
warnBadVendoredStyleName = function(name) { if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { return; } warnedStyleNames[name] = true; error("Unsupported vendor-prefixed style property %s. Did you mean %s?", name, name.charAt(0).toUpperCase() + name.slice(1)); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
warnBadVendoredStyleName
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
warnStyleValueWithSemicolon = function(name, value) { if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) { return; } warnedStyleValues[value] = true; error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`, name, value.replace(badStyleValueWithSemicolonPattern, "")); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
warnStyleValueWithSemicolon
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
warnStyleValueIsNaN = function(name, value) { if (warnedForNaNValue) { return; } warnedForNaNValue = true; error("`NaN` is an invalid value for the `%s` css style property.", name); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
warnStyleValueIsNaN
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
warnStyleValueIsInfinity = function(name, value) { if (warnedForInfinityValue) { return; } warnedForInfinityValue = true; error("`Infinity` is an invalid value for the `%s` css style property.", name); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
warnStyleValueIsInfinity
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function escapeHtml(string) { { checkHtmlStringCoercion(string); } var str = "" + string; var match = matchHtmlRegExp.exec(str); if (!match) { return str; } var escape; var html = ""; var index; var lastIndex = 0; for (index = match.index; index < str.length; index++) { switch (str.charCodeAt(index)) { case 34: escape = "&quot;"; break; case 38: escape = "&amp;"; break; case 39: escape = "&#x27;"; break; case 60: escape = "&lt;"; break; case 62: escape = "&gt;"; break; default: continue; } if (lastIndex !== index) { html += str.substring(lastIndex, index); } lastIndex = index + 1; html += escape; } return lastIndex !== index ? html + str.substring(lastIndex, index) : html; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
escapeHtml
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function escapeTextForBrowser(text) { if (typeof text === "boolean" || typeof text === "number") { return "" + text; } return escapeHtml(text); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
escapeTextForBrowser
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function hyphenateStyleName(name) { return name.replace(uppercasePattern, "-$1").toLowerCase().replace(msPattern$1, "-ms-"); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
hyphenateStyleName
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function sanitizeURL(url) { { if (!didWarn && isJavaScriptProtocol.test(url)) { didWarn = true; error("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.", JSON.stringify(url)); } } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
sanitizeURL
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function isArray(a) { return isArrayImpl(a); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
isArray
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function escapeBootstrapScriptContent(scriptText) { { checkHtmlStringCoercion(scriptText); } return ("" + scriptText).replace(scriptRegex, scriptReplacer); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
escapeBootstrapScriptContent
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
scriptReplacer = function(match, prefix2, s, suffix) { return "" + prefix2 + (s === "s" ? "\\u0073" : "\\u0053") + suffix; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
scriptReplacer
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function createResponseState(identifierPrefix, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules) { var idPrefix = identifierPrefix === void 0 ? "" : identifierPrefix; var inlineScriptWithNonce = nonce === void 0 ? startInlineScript : stringToPrecomputedChunk('<script nonce="' + escapeTextForBrowser(nonce) + '">'); var bootstrapChunks = []; if (bootstrapScriptContent !== void 0) { bootstrapChunks.push(inlineScriptWithNonce, stringToChunk(escapeBootstrapScriptContent(bootstrapScriptContent)), endInlineScript); } if (bootstrapScripts !== void 0) { for (var i = 0; i < bootstrapScripts.length; i++) { bootstrapChunks.push(startScriptSrc, stringToChunk(escapeTextForBrowser(bootstrapScripts[i])), endAsyncScript); } } if (bootstrapModules !== void 0) { for (var _i = 0; _i < bootstrapModules.length; _i++) { bootstrapChunks.push(startModuleSrc, stringToChunk(escapeTextForBrowser(bootstrapModules[_i])), endAsyncScript); } } return { bootstrapChunks, startInlineScript: inlineScriptWithNonce, placeholderPrefix: stringToPrecomputedChunk(idPrefix + "P:"), segmentPrefix: stringToPrecomputedChunk(idPrefix + "S:"), boundaryPrefix: idPrefix + "B:", idPrefix, nextSuspenseID: 0, sentCompleteSegmentFunction: false, sentCompleteBoundaryFunction: false, sentClientRenderFunction: false }; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
createResponseState
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function createFormatContext(insertionMode, selectedValue) { return { insertionMode, selectedValue }; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
createFormatContext
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function createRootFormatContext(namespaceURI) { var insertionMode = namespaceURI === "http://www.w3.org/2000/svg" ? SVG_MODE : namespaceURI === "http://www.w3.org/1998/Math/MathML" ? MATHML_MODE : ROOT_HTML_MODE; return createFormatContext(insertionMode, null); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
createRootFormatContext
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function getChildFormatContext(parentContext, type, props) { switch (type) { case "select": return createFormatContext(HTML_MODE, props.value != null ? props.value : props.defaultValue); case "svg": return createFormatContext(SVG_MODE, null); case "math": return createFormatContext(MATHML_MODE, null); case "foreignObject": return createFormatContext(HTML_MODE, null); case "table": return createFormatContext(HTML_TABLE_MODE, null); case "thead": case "tbody": case "tfoot": return createFormatContext(HTML_TABLE_BODY_MODE, null); case "colgroup": return createFormatContext(HTML_COLGROUP_MODE, null); case "tr": return createFormatContext(HTML_TABLE_ROW_MODE, null); } if (parentContext.insertionMode >= HTML_TABLE_MODE) { return createFormatContext(HTML_MODE, null); } if (parentContext.insertionMode === ROOT_HTML_MODE) { return createFormatContext(HTML_MODE, null); } return parentContext; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
getChildFormatContext
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function assignSuspenseBoundaryID(responseState) { var generatedID = responseState.nextSuspenseID++; return stringToPrecomputedChunk(responseState.boundaryPrefix + generatedID.toString(16)); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
assignSuspenseBoundaryID
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function makeId(responseState, treeId, localId) { var idPrefix = responseState.idPrefix; var id = ":" + idPrefix + "R" + treeId; if (localId > 0) { id += "H" + localId.toString(32); } return id + ":"; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
makeId
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function encodeHTMLTextNode(text) { return escapeTextForBrowser(text); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
encodeHTMLTextNode
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function pushTextInstance(target, text, responseState, textEmbedded) { if (text === "") { return textEmbedded; } if (textEmbedded) { target.push(textSeparator); } target.push(stringToChunk(encodeHTMLTextNode(text))); return true; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
pushTextInstance
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function pushSegmentFinale(target, responseState, lastPushedText, textEmbedded) { if (lastPushedText && textEmbedded) { target.push(textSeparator); } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
pushSegmentFinale
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function processStyleName(styleName) { var chunk = styleNameCache.get(styleName); if (chunk !== void 0) { return chunk; } var result = stringToPrecomputedChunk(escapeTextForBrowser(hyphenateStyleName(styleName))); styleNameCache.set(styleName, result); return result; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
processStyleName
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function pushStyle(target, responseState, style) { if (typeof style !== "object") { throw new Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX."); } var isFirst = true; for (var styleName in style) { if (!hasOwnProperty.call(style, styleName)) { continue; } var styleValue = style[styleName]; if (styleValue == null || typeof styleValue === "boolean" || styleValue === "") { continue; } var nameChunk = void 0; var valueChunk = void 0; var isCustomProperty = styleName.indexOf("--") === 0; if (isCustomProperty) { nameChunk = stringToChunk(escapeTextForBrowser(styleName)); { checkCSSPropertyStringCoercion(styleValue, styleName); } valueChunk = stringToChunk(escapeTextForBrowser(("" + styleValue).trim())); } else { { warnValidStyle$1(styleName, styleValue); } nameChunk = processStyleName(styleName); if (typeof styleValue === "number") { if (styleValue !== 0 && !hasOwnProperty.call(isUnitlessNumber, styleName)) { valueChunk = stringToChunk(styleValue + "px"); } else { valueChunk = stringToChunk("" + styleValue); } } else { { checkCSSPropertyStringCoercion(styleValue, styleName); } valueChunk = stringToChunk(escapeTextForBrowser(("" + styleValue).trim())); } } if (isFirst) { isFirst = false; target.push(styleAttributeStart, nameChunk, styleAssign, valueChunk); } else { target.push(styleSeparator, nameChunk, styleAssign, valueChunk); } } if (!isFirst) { target.push(attributeEnd); } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
pushStyle
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function pushAttribute(target, responseState, name, value) { switch (name) { case "style": { pushStyle(target, responseState, value); return; } case "defaultValue": case "defaultChecked": case "innerHTML": case "suppressContentEditableWarning": case "suppressHydrationWarning": return; } if ( // shouldIgnoreAttribute // We have already filtered out null/undefined and reserved words. name.length > 2 && (name[0] === "o" || name[0] === "O") && (name[1] === "n" || name[1] === "N") ) { return; } var propertyInfo = getPropertyInfo(name); if (propertyInfo !== null) { switch (typeof value) { case "function": case "symbol": return; case "boolean": { if (!propertyInfo.acceptsBooleans) { return; } } } var attributeName = propertyInfo.attributeName; var attributeNameChunk = stringToChunk(attributeName); switch (propertyInfo.type) { case BOOLEAN: if (value) { target.push(attributeSeparator, attributeNameChunk, attributeEmptyString); } return; case OVERLOADED_BOOLEAN: if (value === true) { target.push(attributeSeparator, attributeNameChunk, attributeEmptyString); } else if (value === false) ; else { target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); } return; case NUMERIC: if (!isNaN(value)) { target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); } break; case POSITIVE_NUMERIC: if (!isNaN(value) && value >= 1) { target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); } break; default: if (propertyInfo.sanitizeURL) { { checkAttributeStringCoercion(value, attributeName); } value = "" + value; sanitizeURL(value); } target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); } } else if (isAttributeNameSafe(name)) { switch (typeof value) { case "function": case "symbol": return; case "boolean": { var prefix2 = name.toLowerCase().slice(0, 5); if (prefix2 !== "data-" && prefix2 !== "aria-") { return; } } } target.push(attributeSeparator, stringToChunk(name), attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd); } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
pushAttribute
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function pushInnerHTML(target, innerHTML, children) { if (innerHTML != null) { if (children != null) { throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`."); } if (typeof innerHTML !== "object" || !("__html" in innerHTML)) { throw new Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information."); } var html = innerHTML.__html; if (html !== null && html !== void 0) { { checkHtmlStringCoercion(html); } target.push(stringToChunk("" + html)); } } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
pushInnerHTML
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function checkSelectProp(props, propName) { { var value = props[propName]; if (value != null) { var array = isArray(value); if (props.multiple && !array) { error("The `%s` prop supplied to <select> must be an array if `multiple` is true.", propName); } else if (!props.multiple && array) { error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.", propName); } } } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
checkSelectProp
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function pushStartSelect(target, props, responseState) { { checkControlledValueProps("select", props); checkSelectProp(props, "value"); checkSelectProp(props, "defaultValue"); if (props.value !== void 0 && props.defaultValue !== void 0 && !didWarnDefaultSelectValue) { error("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://reactjs.org/link/controlled-components"); didWarnDefaultSelectValue = true; } } target.push(startChunkForTag("select")); var children = null; var innerHTML = null; for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { var propValue = props[propKey]; if (propValue == null) { continue; } switch (propKey) { case "children": children = propValue; break; case "dangerouslySetInnerHTML": innerHTML = propValue; break; case "defaultValue": case "value": break; default: pushAttribute(target, responseState, propKey, propValue); break; } } } target.push(endOfStartTag); pushInnerHTML(target, innerHTML, children); return children; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
pushStartSelect
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function flattenOptionChildren(children) { var content = ""; React3.Children.forEach(children, function(child) { if (child == null) { return; } content += child; { if (!didWarnInvalidOptionChildren && typeof child !== "string" && typeof child !== "number") { didWarnInvalidOptionChildren = true; error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."); } } }); return content; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
flattenOptionChildren
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function pushStartOption(target, props, responseState, formatContext) { var selectedValue = formatContext.selectedValue; target.push(startChunkForTag("option")); var children = null; var value = null; var selected = null; var innerHTML = null; for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { var propValue = props[propKey]; if (propValue == null) { continue; } switch (propKey) { case "children": children = propValue; break; case "selected": selected = propValue; { if (!didWarnSelectedSetOnOption) { error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."); didWarnSelectedSetOnOption = true; } } break; case "dangerouslySetInnerHTML": innerHTML = propValue; break; case "value": value = propValue; default: pushAttribute(target, responseState, propKey, propValue); break; } } } if (selectedValue != null) { var stringValue; if (value !== null) { { checkAttributeStringCoercion(value, "value"); } stringValue = "" + value; } else { { if (innerHTML !== null) { if (!didWarnInvalidOptionInnerHTML) { didWarnInvalidOptionInnerHTML = true; error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."); } } } stringValue = flattenOptionChildren(children); } if (isArray(selectedValue)) { for (var i = 0; i < selectedValue.length; i++) { { checkAttributeStringCoercion(selectedValue[i], "value"); } var v = "" + selectedValue[i]; if (v === stringValue) { target.push(selectedMarkerAttribute); break; } } } else { { checkAttributeStringCoercion(selectedValue, "select.value"); } if ("" + selectedValue === stringValue) { target.push(selectedMarkerAttribute); } } } else if (selected) { target.push(selectedMarkerAttribute); } target.push(endOfStartTag); pushInnerHTML(target, innerHTML, children); return children; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
pushStartOption
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function pushInput(target, props, responseState) { { checkControlledValueProps("input", props); if (props.checked !== void 0 && props.defaultChecked !== void 0 && !didWarnDefaultChecked) { error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components", "A component", props.type); didWarnDefaultChecked = true; } if (props.value !== void 0 && props.defaultValue !== void 0 && !didWarnDefaultInputValue) { error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components", "A component", props.type); didWarnDefaultInputValue = true; } } target.push(startChunkForTag("input")); var value = null; var defaultValue = null; var checked = null; var defaultChecked = null; for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { var propValue = props[propKey]; if (propValue == null) { continue; } switch (propKey) { case "children": case "dangerouslySetInnerHTML": throw new Error("input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."); case "defaultChecked": defaultChecked = propValue; break; case "defaultValue": defaultValue = propValue; break; case "checked": checked = propValue; break; case "value": value = propValue; break; default: pushAttribute(target, responseState, propKey, propValue); break; } } } if (checked !== null) { pushAttribute(target, responseState, "checked", checked); } else if (defaultChecked !== null) { pushAttribute(target, responseState, "checked", defaultChecked); } if (value !== null) { pushAttribute(target, responseState, "value", value); } else if (defaultValue !== null) { pushAttribute(target, responseState, "value", defaultValue); } target.push(endOfStartTagSelfClosing); return null; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
pushInput
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function pushStartTextArea(target, props, responseState) { { checkControlledValueProps("textarea", props); if (props.value !== void 0 && props.defaultValue !== void 0 && !didWarnDefaultTextareaValue) { error("Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components"); didWarnDefaultTextareaValue = true; } } target.push(startChunkForTag("textarea")); var value = null; var defaultValue = null; var children = null; for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { var propValue = props[propKey]; if (propValue == null) { continue; } switch (propKey) { case "children": children = propValue; break; case "value": value = propValue; break; case "defaultValue": defaultValue = propValue; break; case "dangerouslySetInnerHTML": throw new Error("`dangerouslySetInnerHTML` does not make sense on <textarea>."); default: pushAttribute(target, responseState, propKey, propValue); break; } } } if (value === null && defaultValue !== null) { value = defaultValue; } target.push(endOfStartTag); if (children != null) { { error("Use the `defaultValue` or `value` props instead of setting children on <textarea>."); } if (value != null) { throw new Error("If you supply `defaultValue` on a <textarea>, do not pass children."); } if (isArray(children)) { if (children.length > 1) { throw new Error("<textarea> can only have at most one child."); } { checkHtmlStringCoercion(children[0]); } value = "" + children[0]; } { checkHtmlStringCoercion(children); } value = "" + children; } if (typeof value === "string" && value[0] === "\n") { target.push(leadingNewline); } if (value !== null) { { checkAttributeStringCoercion(value, "value"); } target.push(stringToChunk(encodeHTMLTextNode("" + value))); } return null; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
pushStartTextArea
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function pushSelfClosing(target, props, tag, responseState) { target.push(startChunkForTag(tag)); for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { var propValue = props[propKey]; if (propValue == null) { continue; } switch (propKey) { case "children": case "dangerouslySetInnerHTML": throw new Error(tag + " is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."); default: pushAttribute(target, responseState, propKey, propValue); break; } } } target.push(endOfStartTagSelfClosing); return null; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
pushSelfClosing
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function pushStartMenuItem(target, props, responseState) { target.push(startChunkForTag("menuitem")); for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { var propValue = props[propKey]; if (propValue == null) { continue; } switch (propKey) { case "children": case "dangerouslySetInnerHTML": throw new Error("menuitems cannot have `children` nor `dangerouslySetInnerHTML`."); default: pushAttribute(target, responseState, propKey, propValue); break; } } } target.push(endOfStartTag); return null; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
pushStartMenuItem
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function pushStartTitle(target, props, responseState) { target.push(startChunkForTag("title")); var children = null; for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { var propValue = props[propKey]; if (propValue == null) { continue; } switch (propKey) { case "children": children = propValue; break; case "dangerouslySetInnerHTML": throw new Error("`dangerouslySetInnerHTML` does not make sense on <title>."); default: pushAttribute(target, responseState, propKey, propValue); break; } } } target.push(endOfStartTag); { var child = Array.isArray(children) && children.length < 2 ? children[0] || null : children; if (Array.isArray(children) && children.length > 1) { error("A title element received an array with more than 1 element as children. In browsers title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering"); } else if (child != null && child.$$typeof != null) { error("A title element received a React element for children. In the browser title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering"); } else if (child != null && typeof child !== "string" && typeof child !== "number") { error("A title element received a value that was not a string or number for children. In the browser title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering"); } } return children; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
pushStartTitle
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function pushStartGenericElement(target, props, tag, responseState) { target.push(startChunkForTag(tag)); var children = null; var innerHTML = null; for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { var propValue = props[propKey]; if (propValue == null) { continue; } switch (propKey) { case "children": children = propValue; break; case "dangerouslySetInnerHTML": innerHTML = propValue; break; default: pushAttribute(target, responseState, propKey, propValue); break; } } } target.push(endOfStartTag); pushInnerHTML(target, innerHTML, children); if (typeof children === "string") { target.push(stringToChunk(encodeHTMLTextNode(children))); return null; } return children; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
pushStartGenericElement
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function pushStartCustomElement(target, props, tag, responseState) { target.push(startChunkForTag(tag)); var children = null; var innerHTML = null; for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { var propValue = props[propKey]; if (propValue == null) { continue; } switch (propKey) { case "children": children = propValue; break; case "dangerouslySetInnerHTML": innerHTML = propValue; break; case "style": pushStyle(target, responseState, propValue); break; case "suppressContentEditableWarning": case "suppressHydrationWarning": break; default: if (isAttributeNameSafe(propKey) && typeof propValue !== "function" && typeof propValue !== "symbol") { target.push(attributeSeparator, stringToChunk(propKey), attributeAssign, stringToChunk(escapeTextForBrowser(propValue)), attributeEnd); } break; } } } target.push(endOfStartTag); pushInnerHTML(target, innerHTML, children); return children; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
pushStartCustomElement
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function pushStartPreformattedElement(target, props, tag, responseState) { target.push(startChunkForTag(tag)); var children = null; var innerHTML = null; for (var propKey in props) { if (hasOwnProperty.call(props, propKey)) { var propValue = props[propKey]; if (propValue == null) { continue; } switch (propKey) { case "children": children = propValue; break; case "dangerouslySetInnerHTML": innerHTML = propValue; break; default: pushAttribute(target, responseState, propKey, propValue); break; } } } target.push(endOfStartTag); if (innerHTML != null) { if (children != null) { throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`."); } if (typeof innerHTML !== "object" || !("__html" in innerHTML)) { throw new Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information."); } var html = innerHTML.__html; if (html !== null && html !== void 0) { if (typeof html === "string" && html.length > 0 && html[0] === "\n") { target.push(leadingNewline, stringToChunk(html)); } else { { checkHtmlStringCoercion(html); } target.push(stringToChunk("" + html)); } } } if (typeof children === "string" && children[0] === "\n") { target.push(leadingNewline); } return children; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
pushStartPreformattedElement
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function startChunkForTag(tag) { var tagStartChunk = validatedTagCache.get(tag); if (tagStartChunk === void 0) { if (!VALID_TAG_REGEX.test(tag)) { throw new Error("Invalid tag: " + tag); } tagStartChunk = stringToPrecomputedChunk("<" + tag); validatedTagCache.set(tag, tagStartChunk); } return tagStartChunk; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
startChunkForTag
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function pushStartInstance(target, type, props, responseState, formatContext) { { validateProperties(type, props); validateProperties$1(type, props); validateProperties$2(type, props, null); if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) { error("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."); } if (formatContext.insertionMode !== SVG_MODE && formatContext.insertionMode !== MATHML_MODE) { if (type.indexOf("-") === -1 && typeof props.is !== "string" && type.toLowerCase() !== type) { error("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.", type); } } } switch (type) { case "select": return pushStartSelect(target, props, responseState); case "option": return pushStartOption(target, props, responseState, formatContext); case "textarea": return pushStartTextArea(target, props, responseState); case "input": return pushInput(target, props, responseState); case "menuitem": return pushStartMenuItem(target, props, responseState); case "title": return pushStartTitle(target, props, responseState); case "listing": case "pre": { return pushStartPreformattedElement(target, props, type, responseState); } case "area": case "base": case "br": case "col": case "embed": case "hr": case "img": case "keygen": case "link": case "meta": case "param": case "source": case "track": case "wbr": { return pushSelfClosing(target, props, type, responseState); } case "annotation-xml": case "color-profile": case "font-face": case "font-face-src": case "font-face-uri": case "font-face-format": case "font-face-name": case "missing-glyph": { return pushStartGenericElement(target, props, type, responseState); } case "html": { if (formatContext.insertionMode === ROOT_HTML_MODE) { target.push(DOCTYPE); } return pushStartGenericElement(target, props, type, responseState); } default: { if (type.indexOf("-") === -1 && typeof props.is !== "string") { return pushStartGenericElement(target, props, type, responseState); } else { return pushStartCustomElement(target, props, type, responseState); } } } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
pushStartInstance
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function pushEndInstance(target, type, props) { switch (type) { case "area": case "base": case "br": case "col": case "embed": case "hr": case "img": case "input": case "keygen": case "link": case "meta": case "param": case "source": case "track": case "wbr": { break; } default: { target.push(endTag1, stringToChunk(type), endTag2); } } }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
pushEndInstance
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function writeCompletedRoot(destination, responseState) { var bootstrapChunks = responseState.bootstrapChunks; var i = 0; for (; i < bootstrapChunks.length - 1; i++) { writeChunk(destination, bootstrapChunks[i]); } if (i < bootstrapChunks.length) { return writeChunkAndReturn(destination, bootstrapChunks[i]); } return true; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
writeCompletedRoot
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function writePlaceholder(destination, responseState, id) { writeChunk(destination, placeholder1); writeChunk(destination, responseState.placeholderPrefix); var formattedID = stringToChunk(id.toString(16)); writeChunk(destination, formattedID); return writeChunkAndReturn(destination, placeholder2); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
writePlaceholder
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function writeStartCompletedSuspenseBoundary(destination, responseState) { return writeChunkAndReturn(destination, startCompletedSuspenseBoundary); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
writeStartCompletedSuspenseBoundary
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function writeStartPendingSuspenseBoundary(destination, responseState, id) { writeChunk(destination, startPendingSuspenseBoundary1); if (id === null) { throw new Error("An ID must have been assigned before we can complete the boundary."); } writeChunk(destination, id); return writeChunkAndReturn(destination, startPendingSuspenseBoundary2); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
writeStartPendingSuspenseBoundary
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function writeStartClientRenderedSuspenseBoundary(destination, responseState, errorDigest, errorMesssage, errorComponentStack) { var result; result = writeChunkAndReturn(destination, startClientRenderedSuspenseBoundary); writeChunk(destination, clientRenderedSuspenseBoundaryError1); if (errorDigest) { writeChunk(destination, clientRenderedSuspenseBoundaryError1A); writeChunk(destination, stringToChunk(escapeTextForBrowser(errorDigest))); writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial); } { if (errorMesssage) { writeChunk(destination, clientRenderedSuspenseBoundaryError1B); writeChunk(destination, stringToChunk(escapeTextForBrowser(errorMesssage))); writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial); } if (errorComponentStack) { writeChunk(destination, clientRenderedSuspenseBoundaryError1C); writeChunk(destination, stringToChunk(escapeTextForBrowser(errorComponentStack))); writeChunk(destination, clientRenderedSuspenseBoundaryErrorAttrInterstitial); } } result = writeChunkAndReturn(destination, clientRenderedSuspenseBoundaryError2); return result; }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
writeStartClientRenderedSuspenseBoundary
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT
function writeEndCompletedSuspenseBoundary(destination, responseState) { return writeChunkAndReturn(destination, endSuspenseBoundary); }
Sets a subset of the state. This only exists because _pendingState is internal. This provides a merging strategy that is not available to deep properties which is confusing. TODO: Expose pendingState or don't use it during the merge. @param {ReactClass} publicInstance The instance that should rerender. @param {object} partialState Next partial state to be merged with state. @param {?function} callback Called after component is updated. @param {?string} Name of the calling function in the public API. @internal
writeEndCompletedSuspenseBoundary
javascript
wasmerio/winterjs
benchmark/complex.js
https://github.com/wasmerio/winterjs/blob/master/benchmark/complex.js
MIT