Skip to content

Commit

Permalink
update DOM rendering of <script> and <style>
Browse files Browse the repository at this point in the history
  • Loading branch information
Conduitry committed Jan 8, 2018
1 parent 1f229cf commit 00a0445
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/generators/nodes/Element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,10 @@ export default class Element extends Node {

if (isVoidElementName(node.name)) return open + '>';

if (node.name === 'script' || node.name === 'style') {
return `${open}>${node.data}</${node.name}>`;
}

return `${open}>${node.children.map(toHTML).join('')}</${node.name}>`;
}
}
Expand Down Expand Up @@ -756,4 +760,4 @@ const events = [
node.isMediaNode() &&
(name === 'buffered' || name === 'seekable')
}
];
];

0 comments on commit 00a0445

Please sign in to comment.