MCPcopy Create free account
hub / github.com/denoland/std / onProcessingInstruction

Method onProcessingInstruction

xml/_parser.ts:615–638  ·  view source on GitHub ↗
(
    target: string,
    content: string,
    line: number,
    column: number,
    offset: number,
  )

Source from the content-addressed store, hash-verified

613 }
614
615 onProcessingInstruction(
616 target: string,
617 content: string,
618 line: number,
619 column: number,
620 offset: number,
621 ): void {
622 // XML Namespaces §3: PI targets must not contain colons
623 if (target.includes(":")) {
624 throw new XmlSyntaxError(
625 "Cannot use ':' in processing instruction target (Namespaces §3)",
626 { line, column, offset },
627 );
628 }
629
630 if (this.#ignoreProcessingInstructions) return;
631 this.#callbacks.onProcessingInstruction?.(
632 target,
633 content,
634 line,
635 column,
636 offset,
637 );
638 }
639
640 onDeclaration(
641 version: string,

Callers 2

#capturePIMethod · 0.80
processMethod · 0.80

Calls 1

includesMethod · 0.80

Tested by

no test coverage detected