public abstract class AmpComponent extends Object
Base class to representation amp components.
Constructor and Description |
---|
AmpComponent() |
Modifier and Type | Method and Description |
---|---|
AmpAttributes |
getAttributes()
AMP provides a set of common attributes that are extended to many AMP components.
|
String |
getFallback()
A fallback is a convention that allows the element to communicate to the reader that the browser does not support the element.
|
AmpComponent |
getPlaceholder()
The element marked with the placeholder attribute acts as a placeholder for the parent AMP element.
|
abstract String |
getRequiredScript()
Required script that muct be added to head section.
|
void |
setFallback(String value)
A fallback is a convention that allows the element to communicate to the reader that the browser does not support the element.
|
void |
setPlaceholder(AmpComponent value)
The element marked with the placeholder attribute acts as a placeholder for the parent AMP element.
|
abstract String |
toAmpHtml()
Represents amp html version of component.
|
abstract String |
toHtml()
Represents html version of component.
|
public abstract String getRequiredScript()
Required script that muct be added to head section.
public abstract String toAmpHtml()
Represents amp html version of component.
public abstract String toHtml()
Represents html version of component.
public final AmpAttributes getAttributes()
AMP provides a set of common attributes that are extended to many AMP components.
public final String getFallback()
A fallback is a convention that allows the element to communicate to the reader that the browser does not support the element.
public final void setFallback(String value)
A fallback is a convention that allows the element to communicate to the reader that the browser does not support the element.
public final AmpComponent getPlaceholder()
The element marked with the placeholder attribute acts as a placeholder for the parent AMP element. If specified, a placeholder element must be a direct child of the AMP element.
public final void setPlaceholder(AmpComponent value)
The element marked with the placeholder attribute acts as a placeholder for the parent AMP element. If specified, a placeholder element must be a direct child of the AMP element.