MCPcopy Index your code
hub / github.com/github/docs / initCopyButtonEvent

Function initCopyButtonEvent

components/lib/events.ts:273–280  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

271}
272
273function initCopyButtonEvent() {
274 document.documentElement.addEventListener('click', (evt) => {
275 const target = evt.target as HTMLElement
276 const button = target.closest('.js-btn-copy') as HTMLButtonElement
277 if (!button) return
278 sendEvent({ type: EventType.navigate, navigate_label: 'copy icon button' })
279 })
280}
281
282function initLinkEvent() {
283 document.documentElement.addEventListener('click', (evt) => {

Callers 1

initializeEventsFunction · 0.85

Calls 1

sendEventFunction · 0.85

Tested by

no test coverage detected