UNPKG

jsx-view

Version:

Minimal JSX for HTML DOM tightly integrated with RxJS. TypeScript definitions, and attributes can be assigned to observables.

25 lines 628 B
import { createContext } from "./Context"; import { addContext, ContextAccessError } from "./renderSpec"; /** @internal */ export const _devctx = createContext(null); export const _devctxglobal = [null]; /** * Do something to every element given their dev information. * * @remarks * **Experimental**, please share feedback! */ export function addJSXDev(fn) { try { addContext(_devctx, fn); } catch (err) { if (err instanceof ContextAccessError) { _devctxglobal[0] = fn; } else { console.error(err); } } } //# sourceMappingURL=addJSXDev.js.map