Package com.google.gwt.safehtml.client
Interface HasSafeHtml
-
- All Known Subinterfaces:
DialogBox.Caption
,HasDirectionalSafeHtml
- All Known Implementing Classes:
Anchor
,Button
,ButtonBase
,CheckBox
,CustomButton
,CustomButton.Face
,DialogBox
,DialogBox.CaptionImpl
,HTML
,Hyperlink
,InlineHTML
,InlineHyperlink
,MenuItem
,PushButton
,RadioButton
,ResetButton
,RichTextArea
,SubmitButton
,ToggleButton
,TreeItem
public interface HasSafeHtml
An object that implements this interface contains text with HTML markup, which can be set with the Cross-Site-Scripting-safe HTML markup encapsulated in aSafeHtml
object.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
setHTML(SafeHtml html)
Sets this object's contents via known-safe HTML.
-
-
-
Method Detail
-
setHTML
void setHTML(SafeHtml html)
Sets this object's contents via known-safe HTML.The object will behave exactly the same as when a widget's
HasHTML.setHTML(String)
method is invoked; however theSafeHtml
passed to this method observes the contract that it can be used in an HTML context without causing unsafe script execution. Thus, unlikeHasHTML.setHTML(String)
, using this method cannot result in Cross-Site Scripting security vulnerabilities.- Parameters:
html
- the object's new HTML, represented as aSafeHtml
object
-
-