Interface ICSSUrlVisitor

All Known Implementing Classes:
AbstractModifyingCSSUrlVisitor, DefaultCSSUrlVisitor

public interface ICSSUrlVisitor
Interface for visiting all URLs in a CSS document.
Author:
Philip Helger
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Before visiting starts.
    default void
    end()
    After visiting is done.
    void
    onImport(CSSImportRule aImportRule)
    Called on CSS import statement.
    void
    Called on a CSS declaration value that contains an URL.
    Note: for keyframes it is currently not possible to retrieve the keyframes block to which the declaration belongs.
  • Method Details

    • begin

      default void begin()
      Before visiting starts.
    • onImport

      void onImport(@Nonnull CSSImportRule aImportRule)
      Called on CSS import statement. Use aImportRule.getLocation() to retrieve the imported URL.
      Parameters:
      aImportRule - Other imported CSS. Never null.
    • onUrlDeclaration

      void onUrlDeclaration(@Nullable ICSSTopLevelRule aTopLevelRule, @Nonnull CSSDeclaration aDeclaration, @Nonnull CSSExpressionMemberTermURI aURITerm)
      Called on a CSS declaration value that contains an URL.
      Note: for keyframes it is currently not possible to retrieve the keyframes block to which the declaration belongs.
      Parameters:
      aTopLevelRule - Top level rule of the URL. May be null when a declaration list is handled.
      aDeclaration - Declaration of the URL. Never null.
      aURITerm - The URI term from the current expression. Never null.
    • end

      default void end()
      After visiting is done.