Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
Index your code
hub
/
github.com/ampproject/amphtml
/ tryResolve
Function
tryResolve
src/core/data-structures/promise.js:65–69 ·
view source on GitHub ↗
(fn)
Source
from the content-addressed store, hash-verified
63
* @template T
64
*/
65
export
function
tryResolve(fn) {
66
return
new
Promise((resolve) => {
67
resolve(fn());
68
});
69
}
70
71
/**
72
* Resolves with the result of the last promise added.
Callers
15
layoutCallback
Method · 0.90
safePlayOrPause_
Method · 0.90
tryPlay
Function · 0.90
playIgnoringError
Function · 0.90
getRandomString64
Function · 0.90
sendMessageInternal_
Method · 0.90
push
Method · 0.90
replace
Method · 0.90
get
Method · 0.90
evaluateBindingAsync_
Method · 0.90
scrollIntoViewInternal_
Method · 0.90
getElementScrollTop_
Method · 0.90
Calls
2
resolve
Function · 0.50
fn
Function · 0.50
Tested by
no test coverage detected