Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32768810
vector-utils.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
450 B
Referenced Files
None
Subscribers
None
vector-utils.js
View Options
// @flow
import
invariant
from
'invariant'
;
declare
class
SVGElement
{
parentNode
:
Element
;
}
function
htmlTargetFromEvent
(
event
:
SyntheticEvent
<*>
)
:
HTMLElement
{
let
target
=
event
.
target
;
while
(
!
(
target
instanceof
HTMLElement
))
{
invariant
(
target
instanceof
SVGElement
,
'non-HTMLElements in typeahead should be SVGElements'
,
);
target
=
target
.
parentNode
;
}
return
target
;
}
export
{
htmlTargetFromEvent
};
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Fri, Jan 9, 12:30 PM (20 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5866299
Default Alt Text
vector-utils.js (450 B)
Attached To
Mode
rCOMM Comm
Attached
Detach File
Event Timeline
Log In to Comment