diff --git a/src/compiler/compile/render_dom/wrappers/Element/index.ts b/src/compiler/compile/render_dom/wrappers/Element/index.ts index ba66d83ffb..71e5260a9e 100644 --- a/src/compiler/compile/render_dom/wrappers/Element/index.ts +++ b/src/compiler/compile/render_dom/wrappers/Element/index.ts @@ -277,12 +277,7 @@ export default class ElementWrapper extends Wrapper { render(block: Block, parent_node: Identifier, parent_nodes: Identifier) { const { renderer } = this; - if (this.node.name === 'noscript') { - if (renderer.options.hydratable) { - block.chunks.claim.push(b`@claim_noscript(${parent_nodes});`); - } - return; - } + if (this.node.name === 'noscript') return; if (this.slot_block) { block = this.slot_block; diff --git a/src/runtime/internal/dom.ts b/src/runtime/internal/dom.ts index a16570377c..fb715ff205 100644 --- a/src/runtime/internal/dom.ts +++ b/src/runtime/internal/dom.ts @@ -184,10 +184,6 @@ export function claim_space(nodes) { return claim_text(nodes, ' '); } -export function claim_noscript(nodes) { - detach(claim_element(nodes, 'NOSCRIPT', {}, false)); -} - function find_comment(nodes, text, start) { for (let i = start; i < nodes.length; i += 1) { const node = nodes[i]; diff --git a/test/runtime/samples/noscript-removal/_config.js b/test/runtime/samples/noscript-removal/_config.js index 657cff8870..3e911ac604 100644 --- a/test/runtime/samples/noscript-removal/_config.js +++ b/test/runtime/samples/noscript-removal/_config.js @@ -1,9 +1,4 @@ export default { - html: ` -