feat: upgrade fresh
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import { unified } from "https://esm.sh/unified@10.1.2";
|
||||
import { render } from "https://deno.land/x/gfm@0.2.5/mod.ts";
|
||||
import { render } from "gfm";
|
||||
import "https://esm.sh/prismjs@1.29.0/components/prism-typescript?no-check";
|
||||
import "https://esm.sh/prismjs@1.29.0/components/prism-bash?no-check";
|
||||
import "https://esm.sh/prismjs@1.29.0/components/prism-rust?no-check";
|
||||
|
@ -3,7 +3,7 @@ import { useEffect, useRef } from "preact/hooks";
|
||||
export function useEventListener<T extends Event>(
|
||||
eventName: string,
|
||||
handler: (event: T) => void,
|
||||
element: Window | HTMLElement = window,
|
||||
element: Window | HTMLElement = globalThis,
|
||||
) {
|
||||
// Create a ref that stores handler
|
||||
const savedHandler = useRef<(event: Event) => void>();
|
||||
|
Reference in New Issue
Block a user