This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 27995 - Consider adding some sort of shorthand for resolving a promise with an IDL value
Summary: Consider adding some sort of shorthand for resolving a promise with an IDL value
Status: RESOLVED MOVED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: WebIDL (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Cameron McCormack
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-10 19:37 UTC by Boris Zbarsky
Modified: 2017-12-06 11:53 UTC (History)
5 users (show)

See Also:


Attachments

Description Boris Zbarsky 2015-02-10 19:37:35 UTC
Basically just invoke http://heycam.github.io/webidl/#dfn-convert-idl-to-ecmascript-value and then resolve the promise with the result, at least in the ES binding.

Maybe it's clear enough when people resolve promises with IDL values in their algorithms that this is what's supposed to happen, of course.  Except people keep getting confused about what happens with dictionaries and sequences, since resolving with one will create a new JS object.