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 22357 - Don't special case callable 'then'
Summary: Don't special case callable 'then'
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: DOM (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Anne
QA Contact: public-webapps-bugzilla
Depends on:
Reported: 2013-06-13 20:36 UTC by Olli Pettay
Modified: 2013-09-10 12:43 UTC (History)
4 users (show)

See Also:


Description Olli Pettay 2013-06-13 20:36:17 UTC would be simpler if
"If JavaScript IsCallable(then) is true, run these substeps and then terminate these steps:" wasn't there, but if 'then' isn't callable, just throw and handle that the same way what would happen if 'then' was callable and throws an exception.
Comment 1 Anne 2013-06-14 06:29:08 UTC
Why would we try to invoke 'then' if it's not callable though? It seems this design might change slightly anyway :/
Comment 2 Anne 2013-09-10 12:43:52 UTC
The reason for doing [[Get]] and checking if it's callable and then [[Call]] rather than just doing [[Invoke]] is because a lot of JavaScript does it that way. We might change some of this though:

In any event, this is now out of scope for DOM as the text has moved (temporarily).