Class PageExtractionController.ContentParams

Object
org.mozilla.geckoview.PageExtractionController.ContentParams
Enclosing class:
PageExtractionController

public static class PageExtractionController.ContentParams extends Object
Options for controlling how text is extracted from a page.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final boolean
    When true, attempts to remove boilerplate content from the page using reader mode, falling back to full extraction if unavailable.
    final boolean
    When true, returns plain prose instead of the default markdown-annotated text.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ContentParams(boolean removeBoilerplate, boolean useSimpleText)
    Construct a new ContentParams.
  • Method Summary

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • removeBoilerplate

      public final boolean removeBoilerplate
      When true, attempts to remove boilerplate content from the page using reader mode, falling back to full extraction if unavailable.
    • useSimpleText

      public final boolean useSimpleText
      When true, returns plain prose instead of the default markdown-annotated text. Links contribute their text but not their target, and whitespace within a paragraph is collapsed, while the breaks between paragraphs are kept.
  • Constructor Details

    • ContentParams

      public ContentParams(boolean removeBoilerplate, boolean useSimpleText)
      Construct a new ContentParams.
      Parameters:
      removeBoilerplate - whether to remove boilerplate using reader mode
      useSimpleText - whether to return plain prose instead of markdown-annotated text