[Bug 27354] New: Internal slots

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

            Bug ID: 27354
           Summary: Internal slots
           Product: WebAppsWG
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: WebIDL
          Assignee: cam@mcc.id.au
          Reporter: annevk@annevk.nl
        QA Contact: public-webapps-bugzilla@w3.org
                CC: mike@w3.org, public-script-coord@w3.org

Within an object definition each attribute should automatically represent an
internal slot of the object, preferably addressable as
/object/@[[attributeName]] from prose. (Combined with the other bug on defining
this, we could have this@[[attributeName]], which would be nice.)

This formalizes something specifications already do, and helps us lay the
groundwork to better define creation of associated objects (in particular their
Realm).


To accompany this we also need something like a [NoSlot] annotation. E.g. while
innerHTML has a getter/setter pair, it does not need an internal slot. The
return value is computed fresh and any caching is up to the UA.


We will also need a way to declare slots when there are no attributes
available, e.g. in the case of getSelection(). Something like

  [[selection]] = Selection

would do.


And we need a way to define default values for these slots, by adding default
values to attributes, e.g.

  readonly attribute boolean cancelable = false;


See
http://lists.w3.org/Archives/Public/public-script-coord/2014OctDec/thread.html#msg156
for background.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Monday, 17 November 2014 18:47:25 UTC