API Reference 0.3.24dart_web_toolkit_utilSafeHtmlRenderer<T>

SafeHtmlRenderer<T> abstract class

An object that can render other objects of a particular type into safe HTML form. Allows decoupling that is useful for a dependency-injection architecture.

@param <T> the type to render

abstract class SafeHtmlRenderer<T> {

 /**
  * Renders {@code object} as safe HTML.
  */
 SafeHtml renderAsSafeHtml(T object);
 
 /**
  * Renders {@code object} as safe HTML, appended directly to {@code builder}.
  */
 void render(T object, SafeHtmlBuilder builder);
}

Methods

abstract void render(T object, SafeHtmlBuilder builder) #

Renders {@code object} as safe HTML, appended directly to {@code builder}.

abstract SafeHtml renderAsSafeHtml(T object) #

Renders {@code object} as safe HTML.