259
}
260
261
function getOwnerDocumentFromRootContainer(
262
- rootContainerElement: Element | Document,
262
+ rootContainerElement: Element | Document | DocumentFragment,
263
): Document {
264
return rootContainerElement.nodeType === DOCUMENT_NODE
265
? (rootContainerElement: any)
284
function setInitialDOMProperties(
285
tag: string,
286
domElement: Element,
287
- rootContainerElement: Element | Document,
287
+ rootContainerElement: Element | Document | DocumentFragment,
288
nextProps: Object,
289
isCustomComponentTag: boolean,
290
): void {
371
export function createElement(
372
type: string,
373
props: Object,
374
- rootContainerElement: Element | Document,
374
+ rootContainerElement: Element | Document | DocumentFragment,
375
parentNamespace: string,
376
): Element {
377
let isCustomComponentTag;
477
478
export function createTextNode(
479
text: string,
480
- rootContainerElement: Element | Document,
480
+ rootContainerElement: Element | Document | DocumentFragment,
481
): Text {
482
return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(
483
text,
488
domElement: Element,
489
tag: string,
490
rawProps: Object,
491
- rootContainerElement: Element | Document,
491
+ rootContainerElement: Element | Document | DocumentFragment,
492
): void {
493
const isCustomComponentTag = isCustomComponent(tag, rawProps);
494
if (__DEV__) {
614
tag: string,
615
lastRawProps: Object,
616
nextRawProps: Object,
617
- rootContainerElement: Element | Document,
617
+ rootContainerElement: Element | Document | DocumentFragment,
618
): null | Array<mixed> {
619
if (__DEV__) {
620
validatePropertiesInDevelopment(tag, nextRawProps);
867
tag: string,
868
rawProps: Object,
869
parentNamespace: string,
870
- rootContainerElement: Element | Document,
870
+ rootContainerElement: Element | Document | DocumentFragment,
871
isConcurrentMode: boolean,
872
shouldWarnDev: boolean,
873
): null | Array<mixed> {
1200
}
1201
1202
export function warnForDeletedHydratableElement(
1203
- parentNode: Element | Document,
1203
+ parentNode: Element | Document | DocumentFragment,
1204
child: Element,
1205
) {
1206
if (__DEV__) {
1217
}
1218
1219
export function warnForDeletedHydratableText(
1220
- parentNode: Element | Document,
1220
+ parentNode: Element | Document | DocumentFragment,
1221
child: Text,
1222
) {
1223
if (__DEV__) {
1234
}
1235
1236
export function warnForInsertedHydratedElement(
1237
- parentNode: Element | Document,
1237
+ parentNode: Element | Document | DocumentFragment,
1238
tag: string,
1239
props: Object,
1240
) {
1252
}
1253
1254
export function warnForInsertedHydratedText(
1255
- parentNode: Element | Document,
1255
+ parentNode: Element | Document | DocumentFragment,
1256
text: string,
1257
) {
1258
if (__DEV__) {