(templateName: string, args: Record<string, any>)
| 206 | } |
| 207 | |
| 208 | renderHTML(templateName: string, args: Record<string, any>) { |
| 209 | const renderers = Object.values((this.ctx as any).server.renderers as Record<string, Renderer>) |
| 210 | .filter((r) => r.accept.includes(templateName) || r.asFallback); |
| 211 | const topPrio = renderers.sort((a, b) => b.priority - a.priority)[0]; |
| 212 | const engine = topPrio?.render || (() => JSON.stringify(args, serializer(false, this))); |
| 213 | return engine(templateName, args, { |
| 214 | handler: this, |
| 215 | UserContext: this.user, |
| 216 | url: this.url, |
| 217 | _: this.translate, |
| 218 | }); |
| 219 | } |
| 220 | } |
| 221 | |
| 222 | export class Handler extends HandlerCommon { |
no test coverage detected