8000 `doctype` is always `null` even when `DocumentType` is present as a child node · Issue #277 · xmldom/xmldom · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
doctype is always null even when DocumentType is present as a child node #277
Closed
@RyanHanekamp

Description

@RyanHanekamp

Applies to 0.7.0 and 0.6.0.

The parsed document has a DTD of

<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.1 20151215//EN" "https://jats.nlm.nih.gov/publishing/1.1/JATS-journalpublishing1.dtd">

The DocumentType is in the list of child nodes:

Document {
...
  childNodes: {
...
    '2': DocumentType {
      name: 'article',
      nodeName: 'article',
      publicId: '"-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.1 20151215//EN"',
      systemId: '"https://jats.nlm.nih.gov/publishing/1.1/JATS-journalpublishing1.dtd"',
      lineNumber: 2,
      columnNumber: 1,
      previousSibling: [Text],
      nextSibling: [Element],
      parentNode: [Circular],
      ownerDocument: [Circular]
    },

However, document.doctype === null. (Not undefined.)

-Ryan

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingspec:DOM-Level-2https://www.w3.org/TR/DOM-Level-2-Core/

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0