@@ -32,7 +32,6 @@ import {
32
32
OVERLOADED_BOOLEAN ,
33
33
NUMERIC ,
34
34
POSITIVE_NUMERIC ,
35
- ROOT_ATTRIBUTE_NAME ,
36
35
} from '../shared/DOMProperty' ;
37
36
import { isUnitlessNumber } from '../shared/CSSProperty' ;
38
37
@@ -64,7 +63,6 @@ export type ResponseState = {
64
63
sentCompleteSegmentFunction : boolean ,
65
64
sentCompleteBoundaryFunction : boolean ,
66
65
sentClientRenderFunction : boolean ,
67
- hasEmittedRoot : boolean ,
68
66
} ;
69
67
70
68
// Allows us to keep track of what we've already written so we can refer back to it.
@@ -81,7 +79,6 @@ export function createResponseState(
81
79
sentCompleteSegmentFunction : false ,
82
80
sentCompleteBoundaryFunction : false ,
83
81
sentClientRenderFunction : false ,
84
- hasEmittedRoot : false ,
85
82
} ;
86
83
}
87
84
@@ -102,7 +99,7 @@ type InsertionMode = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7;
102
99
103
100
// Lets us keep track of contextual state and pick it back up after suspending.
104
101
export type FormatContext = {
105
- insertionMode : InsertionMode , // svg/html/mathml/table
102
+ insertionMode : InsertionMode , // root/ svg/html/mathml/table
106
103
selectedValue : null | string | Array < string > , // the selected value(s) inside a <select>, or null outside <select>
107
104
} ;
108
105
@@ -511,19 +508,6 @@ const endOfStartTagSelfClosing = stringToPrecomputedChunk('/>');
511
508
const idAttr = stringToPrecomputedChunk ( ' id="' ) ;
512
509
const attrEnd = stringToPrecomputedChunk ( '"' ) ;
513
510
514
- const reactRootAttribute = stringToPrecomputedChunk (
515
- ' ' + ROOT_ATTRIBUTE_NAME + '=""' ,
516
- ) ;
517
- function pushReactRoot (
518
- target : Array < Chunk | PrecomputedChunk > ,
519
- responseState : ResponseState ,
520
- ) : void {
521
- if ( ! responseState . hasEmittedRoot ) {
522
- responseState . hasEmittedRoot = true ;
523
- target . push ( reactRootAttribute ) ;
524
- }
525
- }
526
-
527
511
function pushID (
528
512
target : Array < Chunk | PrecomputedChunk > ,
529
513
responseState : ResponseState ,
@@ -657,7 +641,6 @@ function pushStartSelect(
657
641
if ( assignID !== null ) {
658
642
pushID ( target , responseState , assignID , props . id ) ;
659
643
}
660
- pushReactRoot ( target , responseState ) ;
661
644
662
645
target . push ( endOfStartTag ) ;
663
646
pushInnerHTML ( target , innerHTML , children ) ;
@@ -772,7 +755,6 @@ function pushStartOption(
772
755
if ( assignID !== null ) {
773
756
pushID ( target , responseState , assignID , props . id ) ;
774
757
}
775
- pushReactRoot ( target , responseState ) ;
776
758
777
759
target . push ( endOfStartTag ) ;
778
760
return children ;
@@ -860,7 +842,6 @@ function pushInput(
860
842
if ( assignID !== null ) {
861
843
pushID ( target , responseState , assignID , props . id ) ;
862
844
}
863
- pushReactRoot ( target , responseState ) ;
864
845
865
846
target . push ( endOfStartTagSelfClosing ) ;
866
847
return null ;
@@ -925,7 +906,6 @@ function pushStartTextArea(
925
906
if ( assignID !== null ) {
926
907
pushID ( target , responseState , assignID , props . id ) ;
927
908
}
928
- pushReactRoot ( target , responseState ) ;
929
909
930
910
target . push ( endOfStartTag ) ;
931
911
@@ -1002,7 +982,6 @@ function pushSelfClosing(
1002
982
if ( assignID !== null ) {
1003
983
pushID ( target , responseState , assignID , props . id ) ;
1004
984
}
1005
- pushReactRoot ( target , responseState ) ;
1006
985
1007
986
target . push ( endOfStartTagSelfClosing ) ;
1008
987
return null ;
@@ -1039,7 +1018,6 @@ function pushStartMenuItem(
1039
1018
if ( assignID !== null ) {
1040
1019
pushID ( target , responseState , assignID , props . id ) ;
1041
1020
}
1042
- pushReactRoot ( target , responseState ) ;
1043
1021
1044
1022
target . push ( endOfStartTag ) ;
1045
1023
return null ;
@@ -1078,7 +1056,6 @@ function pushStartGenericElement(
1078
1056
if ( assignID !== null ) {
1079
1057
pushID ( target , responseState , assignID , props . id ) ;
1080
1058
}
1081
- pushReactRoot ( target , responseState ) ;
1082
1059
1083
1060
target . push ( endOfStartTag ) ;
1084
1061
pushInnerHTML ( target , innerHTML , children ) ;
@@ -1143,7 +1120,6 @@ function pushStartCustomElement(
1143
1120
if ( assignID !== null ) {
1144
1121
pushID ( target , responseState , assignID , props . id ) ;
1145
1122
}
1146
- pushReactRoot ( target , responseState ) ;
1147
1123
1148
1124
target . push ( endOfStartTag ) ;
1149
1125
pushInnerHTML ( target , innerHTML , children ) ;
@@ -1185,7 +1161,6 @@ function pushStartPreformattedElement(
1185
1161
if ( assignID !== null ) {
1186
1162
pushID ( target , responseState , assignID , props . id ) ;
1187
1163
}
1188
- pushReactRoot ( target , responseState ) ;
1189
1164
1190
1165
target . push ( endOfStartTag ) ;
1191
1166
0 commit comments