Skip to content

Instantly share code, notes, and snippets.

@techniq
Last active February 18, 2016 16:07
Show Gist options
  • Save techniq/2052c5d40f3ab181caac to your computer and use it in GitHub Desktop.
Save techniq/2052c5d40f3ab181caac to your computer and use it in GitHub Desktop.
Element prototype oddity in Chrome console

Element prototype oddity in Chrome console

Object.getPrototypeOf(document.createElementNS('html', 'div'))
  1. When I run this from a script on Chrome 48 (stable) or 50 (canary) I get the expected/desired HTMLDivElement (codepen)
  2. When I run this within the console on Chrome 48 I get Element (no HTMLDivElement or HTMLElement)
  3. When I run this within the console on Chrome 50 I get Node (no HTMLDivElement, HTMLElement, or Element)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment