From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from resqmta-ch2-01v.sys.comcast.net (resqmta-ch2-01v.sys.comcast.net [IPv6:2001:558:fe21:29:69:252:207:33]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 951C177DC4 for ; Tue, 24 Jan 2017 17:50:08 -0800 (PST) Received: from resomta-ch2-18v.sys.comcast.net ([69.252.207.114]) by resqmta-ch2-01v.sys.comcast.net with SMTP id WCjKcnmTRRNZDWCjZczCM7; Wed, 25 Jan 2017 01:50:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20161114; t=1485309049; bh=92PH9DA5iVpNnLvviHde/hpdx8tbHoCBW9ahR1b+KkE=; h=Received:Received:To:From:Reply-to:Subject:Date:Message-ID: Mime-Version:Content-Type; b=OKA2s1/gtwlFzLx9WhdmDLCbuOA8jGWtVZbIdjNpGxLU76CmbG+2p5/bCitUFjNs/ NGsH8wAArjXF5NejYVyQzOFOlWGrQ4t1YDXcuNNPsYMhwiKrz2ajiB2nDhwHCwpTsE QdpfnzBzZMsDaBMDx71UEw6u9e/zgCnNLqK/v8mBgLGd7xEw00MM7DD8fLRD5RAHLi Fg7kUKhTuT1CV6GSWRVXAIxPfGsiNBziHlyRH6GqoR688eR53GrP4zRU5rCGHNJojG mVtqKAyiUoHqyEtrQSa8ifcv2xwKlwYZLAGgTPyuHP/yd3+rPJ0ypFb0uHC8aVKmun sY90osBruzqlA== Received: from unknown ([IPv6:2601:408:c301:784d:21e:4fff:fec2:a0f1]) by resomta-ch2-18v.sys.comcast.net with SMTP id WCjYcSBP5rZgoWCjYcgxtR; Wed, 25 Jan 2017 01:50:49 +0000 To: Edbrowse-dev@lists.the-brannons.com From: Karl Dahlke Reply-to: Karl Dahlke References: <20170119200417.GA5912@odin> User-Agent: edbrowse/3.6.2+ Date: Tue, 24 Jan 2017 20:50:48 -0500 Message-ID: <20170024205048.eklhad@comcast.net> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfIgrJ5Jd5wg62e+CDGhj9T98skiHgwf+iGorWEs0lOgAOWpIk/JKTgmzLdI7Ujv10IQxmS4Hj7SDvx2/98lW/m8YEQHU9HcMRwaRw5h4oIFNiVOTzlGX d9vrun9zdbkL8LoQVKDZGpMROaRSoRAHlFHMUbYHZziGhmVnvLa7Z8wc Subject: [Edbrowse-dev] document.removeAttribute X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.23 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jan 2017 01:50:08 -0000 Kevin, the last line you quoted from the spec... > although they may be accessed by an index as in an array. Ok, if so, then the only practical way to implement that is as an array, which I did in domLink() in decorate.c, but we don't do that when creating nodes dynamically from js. So c. attributes should be new Array, not new Object, but there's more. In setAttribute() line 635 is either unnecessary or not enough. We need to preserve the array essence. Don't we need this? this.attributes.push(name.toLowerCase()); And in removeAttribute it's fine to delete foo from attributes, where we had set attributes.foo = bar, but we must also splice foo out of position i in the array. I'm guessing that if c is the node then there are really three actions to foo = bar. c.foo = bar c.attributes.foo = bar c.attributes.push("foo") I'm not sure of this, I only know what we have is inconsistent, and will definitely cause trouble at some point. If you can confirm that my understanding of this is correct I can clean it up, or perhaps Kevin or Adam can take it on. Karl Dahlke