Clarify "upon fulfillment" and "upon rejection"

As pointed out in https://bugzilla.mozilla.org/show_bug.cgi?id=1091898#c29 by @bzbarsky, the existing phrasing was not very clear about when the substeps were executed. This updates to make it clear that they are executed at the point the shorthand phrase appears.
Syntax-highlight the JavaScript

Now that tabatkins/bikeshed#215 is fixed, we can nicely syntax-highlight.