Skip to content

Latest commit

 

History

History
14 lines (10 loc) · 550 Bytes

retrieving_page_content_dom.md

File metadata and controls

14 lines (10 loc) · 550 Bytes

text file

(appears to work on rendered plaintext, does not work on json response type (e.g. https://api.github.com) - browser JSON rendering controls get included in text).

i.e. document.contentType == "text/plain" :

  • document.documentElement.textContent
  • document.documentElement.innerText

html

(full html but not hash equivalent, changes case "!DOCTYPE"):

  • new XMLSerializer().serializeToString(document)
References: