Function load

  • Create a querying function, bound to a document created from the provided markup.

    Note that similar to web browser contexts, this operation may introduce <html>, <head>, and <body> elements; set isDocument to false to switch to fragment mode and disable this.


    The loaded document.

    See for additional usage information.


    • content: string | AnyNode | AnyNode[] | Buffer

      Markup to be loaded.

    • Optional options: null | CheerioOptions

      Options for the created instance.

    • isDocument: boolean = true

      Allows parser to be switched to fragment mode.

    Returns CheerioAPI