[Bug 25086] Attr should retain ownerElement property

https://www.w3.org/Bugs/Public/show_bug.cgi?id=25086

--- Comment #13 from Philip Jägenstedt <philipj@opera.com> ---
(In reply to Philip Jägenstedt from comment #12)
> (In reply to Anne from comment #9)
> > (In reply to Philip Jägenstedt from comment #2)
> > > https://codereview.chromium.org/203313002/
> > 
> > If attribute's value setter is really the only thing that requires the
> > reference to its parent element, maybe we should look into making it
> > readonly?
> 
> The getter can need it to, since the Element's attribute be changed using
> setAttribute() after the Attr object is created. (This is assuming an Attr
> implementation that's just used for DOM bindings, i.e. that it isn't the
> same object that's used to actually store attributes internally.)

That being said, if Attr.value could be successfully be made readonly, one
could probably get rid of the Element reference in the getter by just making
the Element.setAttribute() and friends update the Attr objects in its children
array. That seems like sensible layering to me, at least.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Wednesday, 19 March 2014 08:32:07 UTC