public interface Preview
WE_API.PreviewExamples:
WE_API.Preview.reload()
; // reloads the current page
Modifier and Type | Interface and Description |
---|---|
static interface |
Preview.ElementReloadListener
Listener for events about reloaded elements in the preview document.
|
Modifier and Type | Method and Description |
---|---|
void |
addElementReloadListener(Preview.ElementReloadListener listener)
Registers a listener for events about reloaded elements in the current preview document.
|
Object |
getParameter(String name)
Returns the current value of the specified preview parameter.
|
JavaScriptObject |
getTimeParameter()
Returns the current time the user has chosen using the preview timeline.
|
JavaScriptObject |
getWindow()
Returns a reference to the current window object of the preview frame.
|
boolean |
isParameterized()
Returns whether or not the current preview parametrization is enabled by the user.
|
void |
reload()
Reloads the current page.
|
void |
reload(Element element)
Reloads the given element.
|
void |
repaint()
Repaints the editor highlighting.
|
void |
rescan(Element element)
Searches in the specified element for new editor identifiers.
|
void |
setParameter(String name,
Object value)
Sets the current value of the specified preview parameter.
|
void |
setTimeParameter(JavaScriptObject date)
Set the time that should be used for preview.
|
void reload()
void reload(@Nullable Element element)
element
- element to reload.void addElementReloadListener(Preview.ElementReloadListener listener)
Registers a listener for events about reloaded elements in the current preview document.
Listener registration in JavaScript might look like:
...addElementReloadListener(function(element){...});
listener
- listener to informvoid rescan(@Nullable Element element)
element
- element to scan for editor identifiers.void repaint()
@Nullable JavaScriptObject getWindow()
null
if currently not availableboolean isParameterized()
true
if preview has parameter, false
otherwise.@Nullable Object getParameter(String name)
name
- name of the preview parameter to get the value for.null
void setParameter(String name, @Nullable Object value)
name
- name of the preview parameter to set the value for.value
- parameter value, or null
@Nullable JavaScriptObject getTimeParameter()
Date
) object, or null
void setTimeParameter(JavaScriptObject date)
date
- the time (as javascript Date
) object, or null
Copyright © 2015 e-Spirit AG. All Rights Reserved. Build 5.1.408