@@ -1309,18 +1309,27 @@ function postParsePath(path, node) {
1309
1309
* - it is missing a declaration for `inherits` or `syntax`
1310
1310
* - it is missing a declaration for `initial-value` if `syntax` is universal
1311
1311
* - its declaration for `initial-value` is invalid according to `syntax`
1312
+ *
1313
+ * It appends the property definition in the current global object’s associated
1314
+ * Document's [[registeredPropertySet]] slot.
1312
1315
*/
1313
1316
function postParseProperty ( rule , node ) {
1314
- const { inherits, initialValue, syntax } = rule
1317
+ const { name, inherits, initialValue, syntax } = rule
1318
+ const register = globalThis . document . _registeredPropertySet
1315
1319
if ( inherits === undefined || syntax === undefined ) {
1316
1320
return error ( node )
1317
1321
}
1318
1322
if ( syntax === '"*"' ) {
1319
- return cssWideKeywords . includes ( initialValue ) ? error ( node ) : rule
1323
+ if ( cssWideKeywords . includes ( initialValue ) ) {
1324
+ return error ( node )
1325
+ }
1326
+ register . push ( { inherits, initialValue, name, syntax } )
1327
+ return rule
1320
1328
}
1321
1329
if ( initialValue ) {
1322
1330
const match = parseGrammar ( initialValue , syntax . slice ( 1 , - 1 ) , '@style' )
1323
1331
if ( ! isFailure ( match ) && isComputationallyIndependent ( match ) ) {
1332
+ register . push ( { inherits, initialValue, name, syntax } )
1324
1333
return rule
1325
1334
}
1326
1335
}
0 commit comments