- From: Cameron McCormack <cam@mcc.id.au>
- Date: Thu, 24 Dec 2015 10:12:29 +1100
- To: Rick Byers <rbyers@chromium.org>
- Cc: "www-style@w3.org" <www-style@w3.org>
- Message-Id: <41565DE3-9F62-4E73-8507-61DFD726CBCF@mcc.id.au>
On 23 Dec 2015, at 8:44 AM, Rick Byers <rbyers@chromium.org> wrote: > > FontFaceSetLoadEvent is defined as <https://drafts.csswg.org/css-font-loading/#dom-fontfacesetloadevent-fontfaces>: > > interface FontFaceSetLoadEvent : Event { > readonly attribute sequence<FontFace> fontfaces; > }; Is that a recently added event? I didn’t see it when I was implementing. > But WebIDL says <https://heycam.github.io/webidl/#idl-sequence>: > > Sequences must not be used as the type of an attribute or constant. > Note: This restriction exists so that it is clear to specification writers and API users that sequences are copied rather than having references to them passed around. Instead of a writable attribute of a sequence type, it is suggested that a pair of operations to get and set the sequence is used. > > I based TouchEvent constructors <https://github.com/w3c/touch-events/pull/16#issuecomment-119785062> partially on the design here, but that's causing some concern <https://github.com/w3c/touch-events/issues/54>. I should probably update that note; there is a new pattern that can be used for exposing Arrays as property values: interface FontFaceSetLoadEvent : Event { readonly attribute FrozenArray<FontFace> fontfaces; }; which will cause the property to have a frozen Array object as its value.
Received on Wednesday, 23 December 2015 23:13:05 UTC