- From: ExE Boss <notifications@github.com>
- Date: Wed, 04 Dec 2019 03:56:06 -0800
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/dom/issues/798@github.com>
They both can’t be expressed in the **HTML** syntax, but one is allowed.
---
Also, the following logs a result that is invalid in both **HTML** and **XML**:
```html
<!DOCTYPE html>
<html data-impo$$ible>
<head>
<script defer type="application/javascript">
var serializer = new XMLSerializer();
document.addEventListener("DOMContentLoaded", () => {
document.insertBefore(
document.createProcessingInstruction('foo', 'bar'),
document.documentElement,
);
console.log(serializer.serializeToString(document));
});
</script>
</head>
</html>
```
Logs:
```xhtml
<!DOCTYPE html>
<?foo bar?>
<html xmlns="http://www.w3.org/1999/xhtml" data-impo$$ible=""><head>
<script defer="defer" type="application/javascript">
var serializer = new XMLSerializer();
document.addEventListener("DOMContentLoaded", () => {
document.insertBefore(
document.createProcessingInstruction('foo', 'bar'),
document.documentElement,
);
console.log(serializer.serializeToString(document));
});
</script>
</head>
<body></body></html>
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/798
Received on Wednesday, 4 December 2019 11:56:10 UTC