Skip to content

Commit

Permalink
[html] display: none for custom element. Refs #341
Browse files Browse the repository at this point in the history
  • Loading branch information
rkd77 committed Dec 4, 2024
1 parent 4af513b commit 004d483
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/document/html/parser/parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -1224,7 +1224,9 @@ process_element(char *name, int namelen, int endingtag,
}
}

if (!ei) return html;
if (!ei) {
ei = &elements[NUMBER_OF_TAGS];
}

if (!endingtag) {
return start_element(ei, name, namelen, html, eof, attr, html_context);
Expand Down
1 change: 1 addition & 0 deletions test/none.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<p style="display: none">Paragraph with display: none inline style</p>
<p class="hidden">Paragraph with class="hidden"</p>
<custom-element>Custom element with display: none global style</custom-element>
<other-custom-element>Other custom element without display: none</other-custom-element>
<template>Template element</template>
<p><button type="submit">button type=submit2</button></p>
<div>div with display: none global style</div>
Expand Down

0 comments on commit 004d483

Please sign in to comment.