Skip to content

Commit

Permalink
Improving type annotation potential
Browse files Browse the repository at this point in the history
  • Loading branch information
jakearchibald committed Apr 6, 2018
1 parent 7ece478 commit 782344a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions service-workers/service-worker/resources/test-helpers.sub.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,14 @@ function unreached_rejection(test, prefix) {
});
}

// Adds an iframe to the document and returns a promise that resolves to the
// iframe when it finishes loading. The caller is responsible for removing the
// iframe later if needed.
/**
* Adds an iframe to the document and returns a promise that resolves to the
* iframe when it finishes loading. The caller is responsible for removing the
* iframe later if needed.
*
* @param {string} url
* @returns {HTMLIFrameElement}
*/
function with_iframe(url) {
return new Promise(function(resolve) {
var frame = document.createElement('iframe');
Expand Down

0 comments on commit 782344a

Please sign in to comment.