W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2011

[Bug 12845] Disallow shadowing attributes

From: <bugzilla@jessica.w3.org>
Date: Sun, 26 Jun 2011 22:39:37 +0000
To: public-script-coord@w3.org
Message-Id: <E1QaxzN-0007kN-Gr@jessica.w3.org>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=12845

--- Comment #33 from Cameron McCormack <cam@mcc.id.au> 2011-06-26 22:39:33 UTC ---
(In reply to comment #31)
> > I'd like a way whereby I can just redefine the attribute on the subclass, e.g.
> > to change it so that it is not readonly.
> 
> I agree we need a way for subclasses to add a setter to a superclass readonly
> attribute, for sure.

I don't see any problem with allowing the SuperClass.prototype.quux to be a
property with a getter only, and SubClass.prototype.quux to be a property with
a getter and a setter, and both reflecting the same internal state.  That works
with Web IDL as it is written today.  I don't see how allowing the derived
interface to cause SuperClass.prototype.quux to grow a setter is any better.

Alternatively, just define quux on the ancestor interface to be writable in the
first place, and define it to throw if its setter is called on an object that
isn't derived from SubClass.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Received on Sunday, 26 June 2011 22:39:38 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:03 UTC