Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Non-standard NamedNodeMap behaviour #14634

Closed
autarc opened this issue Nov 7, 2016 · 1 comment
Closed

Non-standard NamedNodeMap behaviour #14634

autarc opened this issue Nov 7, 2016 · 1 comment
Labels

Comments

@autarc
Copy link

autarc commented Nov 7, 2016

The following issue occurs in the phantomjs version 2.1.1 (binary) on Ubuntu and macOS.

In contrast to the default engine behavior of Blink, Gecko & Co. the NamedNodeMap descriptor returns its length property as a key. You can see the problem in this example:

var page = require('webpage').create();

page.onConsoleMessage = console.log.bind(console);

page.open('http://phantomjs.org/', function (status)  {
  page.evaluate(function(){
    var attributesKeys = Object.keys(document.body.attributes);
    console.log(JSON.stringify(attributesKeys)); // NamedNodeMap properties -> ['length']
  });
  phantom.exit();
});

The expected behavior would be the return of [] (an empty array). For comparison just checkout the result in a browser running the same logik: JSON.stringify(Object.keys(document.body.attributes)).

@autarc autarc changed the title None standard NamedNodeMap behaviour Non-standard NamedNodeMap behaviour Nov 7, 2016
@stale stale bot added the stale label Dec 26, 2019
@stale
Copy link

stale bot commented Dec 29, 2019

Due to our very limited maintenance capacity, we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed (see #15395 for more details). In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution!

@stale stale bot closed this as completed Dec 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant