You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<html><!-- added by DiDOM --><head><!-- added by DiDOM --><metaname="layout" content="main.php"></head><body><!-- added by DiDOM --><article><!-- ... --></article></body></html>
This would be consistent with its behavior when the <article> tag is replaced with a <div>, or when the <article> tag is placed immediately after the <h1> instead of containing it. This would also be valid HTML.
Actual behavior
In practice, DiDOM sees the following structure in our example markup.
<html><!-- added by DiDOM --><head><!-- added by DiDOM --><metaname="layout" content="main.php"><article><!-- UH-OH! This should not be here! --><h1>...</h1><p>...</p></article></head><body><!-- added by DiDOM --></body></html>
This seems like a bug, as an <article> tag as a direct child of the document <head> is not valid HTML.
While it is possible to work around this behavior, it is inconvenient and this behavior is both surprising and incorrect.
The text was updated successfully, but these errors were encountered:
Expected behavior
Given a partial HTML input like the following:
I would expect DiDOM to model it as follows:
This would be consistent with its behavior when the
<article>
tag is replaced with a<div>
, or when the<article>
tag is placed immediately after the<h1>
instead of containing it. This would also be valid HTML.Actual behavior
In practice, DiDOM sees the following structure in our example markup.
This seems like a bug, as an
<article>
tag as a direct child of the document<head>
is not valid HTML.While it is possible to work around this behavior, it is inconvenient and this behavior is both surprising and incorrect.
The text was updated successfully, but these errors were encountered: