From: Kevin Carhart <kevin@carhart.net>
To: Edbrowse-dev@lists.the-brannons.com
Subject: Re: [Edbrowse-dev] document.removeAttribute
Date: Tue, 24 Jan 2017 15:57:57 -0800 (PST) [thread overview]
Message-ID: <alpine.LRH.2.03.1701241554130.10456@carhart.net> (raw)
In-Reply-To: <20170024174651.eklhad@comcast.net>
On Tue, 24 Jan 2017, Karl Dahlke wrote:
> Honestly I don't know if it's suppose to be an array or an object. Not sure of the spec.
> If an array, does the order of attributes matter?
>
I don't think the order matters. I think the indices are strings and so
you would reference them like a hash table of name-value pairs that aren't
in order.
I found this in the MDN pages,
The Element.attributes property returns a live collection of all attribute
nodes registered to the specified node. It is a NamedNodeMap, not an
Array, so it has no Array methods and the Attr nodes' indexes may differ
among browsers. To be more specific, attributes is a key/value pair of
strings that represents any information regarding that attribute.
And for NamedNodeMap it says,
The NamedNodeMap interface represents a collection of Attr objects.
Objects inside a NamedNodeMap are not in any particular order, unlike
NodeList, although they may be accessed by an index as in an array.
https://developer.mozilla.org/en-US/docs/Web/API/Element/attributes
https://developer.mozilla.org/en-US/docs/Web/API/NamedNodeMap
next prev parent reply other threads:[~2017-01-24 23:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-19 20:04 Adam Thompson
2017-01-19 20:32 ` Chris Brannon
2017-01-19 21:34 ` Kevin Carhart
2017-01-24 8:43 ` Adam Thompson
2017-01-24 19:08 ` Adam Thompson
2017-01-24 20:48 ` Karl Dahlke
2017-01-24 22:08 ` Kevin Carhart
[not found] ` <20170024174651.eklhad@comcast.net>
2017-01-24 23:57 ` Kevin Carhart [this message]
2017-01-25 1:50 ` Karl Dahlke
2017-01-21 0:27 ` Karl Dahlke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LRH.2.03.1701241554130.10456@carhart.net \
--to=kevin@carhart.net \
--cc=Edbrowse-dev@lists.the-brannons.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).