Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ampproject/amphtml
/ formOrNullForElement
Function
formOrNullForElement
src/core/dom/form.js:11–13 ·
view source on GitHub ↗
(element)
Source
from the content-addressed store, hash-verified
9
* @
return
{AmpForm}
10
*/
11
export
function
formOrNullForElement(element) {
12
return
element[FORM_PROP_] || null;
13
}
14
15
/**
16
* @param {HTMLElement} element
Callers
2
installSubmissionHandlers_
Method · 0.90
installFormSubmissionShortcutForTextarea_
Method · 0.90
Calls
no outgoing calls
Tested by
no test coverage detected