From f64c4c15579936680e67bc7a35d95d347947450f Mon Sep 17 00:00:00 2001 From: "nanto_vi, TOYAMA Nao" Date: Fri, 25 Jul 2025 17:11:06 +0900 Subject: [PATCH] Add document for parameters of `Parser.parseHtml` (#6576) --- packages/core/src/parser/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/core/src/parser/index.ts b/packages/core/src/parser/index.ts index 2349529c5..0e6abf30c 100644 --- a/packages/core/src/parser/index.ts +++ b/packages/core/src/parser/index.ts @@ -57,6 +57,12 @@ export default class ParserModule extends Module` tags * @param {Boolean} [options.allowUnsafeAttr=false] Allow unsafe HTML attributes (eg. `on*` inline event handlers) + * @param {Boolean} [options.allowUnsafeAttrValue=false] Allow unsafe HTML attribute values (eg. `src="javascript:..."`) + * @param {Boolean} [options.keepEmptyTextNodes=false] Keep whitespaces regardless of whether they are meaningful + * @param {Boolean} [options.asDocument] Treat the HTML string as document + * @param {Boolean|Function} [options.detectDocument] Indicate if or how to detect if the HTML string should be treated as document + * @param {Function} [options.preParser] How to pre-process the HTML string before parsing + * @param {Boolean} [options.convertDataGjsAttributesHyphens=false] Convert `data-gjs-*` attributes from hyphenated to camelCase (eg. `data-gjs-my-component` to `data-gjs-myComponent`) * @returns {Object} Object containing the result `{ html: ..., css: ... }` * @example * const resHtml = Parser.parseHtml(`
Hi
`, {