Files
OpenMAIC/lib/interactive/element-reference-policy.ts
LING DUANandwyuc ebf665f316 feat(playback): reference static GenUI components (#1281)
* feat(playback): reference static GenUI components

* feat(playback): gate courseware references

* fix(pi): bound Interactive source HTML before parsing

* fix(pi): bound interactive reference HTML processing

* fix(playback): close interactive reference review gaps

---------

Co-authored-by: wyuc <wang-yc24@mails.tsinghua.edu.cn>
2026-09-11 19:16:10 +02:00

27 lines
594 B
TypeScript

/** Tags that cannot be selected as static Interactive courseware evidence. */
export const INTERACTIVE_REFERENCE_EXCLUDED_TAG_NAMES = [
'html',
'head',
'body',
'script',
'style',
'link',
'meta',
'noscript',
'template',
'iframe',
'canvas',
'noembed',
'noframes',
'plaintext',
'xmp',
] as const;
const INTERACTIVE_REFERENCE_EXCLUDED_TAG_SET = new Set<string>(
INTERACTIVE_REFERENCE_EXCLUDED_TAG_NAMES,
);
export function isInteractiveReferenceExcludedTag(tagName: string): boolean {
return INTERACTIVE_REFERENCE_EXCLUDED_TAG_SET.has(tagName.toLowerCase());
}