@@ -746,14 +746,13 @@ function consumeBlockContents(tokens, context, ignoreCloseCurlyBlock) {
746746/**
747747 * @param {Stream } tokens
748748 * @param {object } context
749- * @param {boolean } [allowImport]
750749 * @returns {CSSRuleImpl[] }
751750 * @see {@link https://drafts.csswg.org/css-syntax-3/#consume-a-stylesheets-contents }
752751 *
753752 * It deviates from the specification by validating and/or discarding rules here
754- * instead of in consumeAtRule() or CSSStyleSheet.replace*() .
753+ * instead of in consumeAtRule().
755754 */
756- function consumeStyleSheet ( tokens , context , allowImport ) {
755+ function consumeStyleSheet ( tokens , context ) {
757756 const rules = [ ]
758757 while ( ! tokens . atEnd ( ) ) {
759758 if ( tokens . consume ( token => isDelimiter ( [ ' ' , '<!--' , '-->' ] , token ) ) ) {
@@ -763,7 +762,6 @@ function consumeStyleSheet(tokens, context, allowImport) {
763762 const rule = consumeAtRule ( tokens , context )
764763 if (
765764 isError ( rule )
766- || ( ! allowImport && CSSImportRule . isImpl ( rule ) )
767765 || isInvalidIndexForRule ( rules , rule , rules . length )
768766 || isInvalidNamespaceRule ( rules , rule )
769767 ) {
@@ -919,12 +917,11 @@ function parseBlockContents(input, context) {
919917/**
920918 * @param {ReadableStream|Stream|string|object[] } input
921919 * @param {CSSStyleSheetImpl } context
922- * @param {boolean } [allowImport]
923920 * @returns {CSSRuleImpl[] }
924921 * @see {@link https://drafts.csswg.org/css-syntax-3/#parse-a-stylesheet }
925922 */
926- function parseStyleSheet ( input , context , allowImport = false ) {
927- return consumeStyleSheet ( normalizeIntoTokens ( input ) , createContext ( context ) , allowImport )
923+ function parseStyleSheet ( input , context ) {
924+ return consumeStyleSheet ( normalizeIntoTokens ( input ) , createContext ( context ) )
928925}
929926
930927/**
0 commit comments