Interface JavaScriptProvider

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract void setJavaScriptEnabled(boolean isJavaScriptEnabled) Controls whether JavaScript processing is enabled for this document.
      abstract boolean isJavaScriptEnabled() Returns true if JavaScript processing is enabled for this document.
      abstract void executeDocumentLevelScripts() Loads and evaluates top level JavaScript scripts that are associated with the document.
      abstract Completable executeDocumentLevelScriptsAsync() Loads and evaluates top level JavaScript scripts that are associated with the document, asynchronously.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • setJavaScriptEnabled

         abstract void setJavaScriptEnabled(boolean isJavaScriptEnabled)

        Controls whether JavaScript processing is enabled for this document. Defaults to false. Note: Processing JavaScript can be slow for documents with a large number of document providers or scripts. Disabling in most cases will not have any negative effects.

        Parameters:
        isJavaScriptEnabled - true to enable JavaScript processing, false to disable.
      • isJavaScriptEnabled

         abstract boolean isJavaScriptEnabled()

        Returns true if JavaScript processing is enabled for this document.

        Returns:

        true when JavaScript processing is enabled, false otherwise.

      • executeDocumentLevelScripts

         abstract void executeDocumentLevelScripts()

        Loads and evaluates top level JavaScript scripts that are associated with the document. Note: this call may block for a while and should not be invoked on the main thread.

      • executeDocumentLevelScriptsAsync

        @NonNull() abstract Completable executeDocumentLevelScriptsAsync()

        Loads and evaluates top level JavaScript scripts that are associated with the document, asynchronously.

        Returns:

        Completable emitting complete event once the document level scripts are executed.