WebExitEnabler#
- class alfred3.element.misc.WebExitEnabler[source]#
Bases:
alfred3.element.misc.JavaScript
Removes the “Do you really want to leave?” popup upon closing a page.
By default, subjects are asked to confirm their desire to leave a running experiment. You can turn off this behavior by adding this element to a page.
Examples
Minimal example:
import alfred3 as al exp = al.Experiment() @exp.member class Demo(al.Page): name = "demo" def on_exp_access(self): self += al.WebExitEnabler()
Methods
Adds CSS to the element.
Adds Javascript to the element.
Tells the element that it was added to an experiment.
Tells the element that it was added to a page.
Hook for computations for preparing an element's web widget.
Renders the element template
element_template
.Attributes
Base template for the element, which will be used to hold the rendered element template.
List of bootstrap column widths at different screen sizes.
Returns the name the element container's CSS class.
Returns the name of the element's CSS class.
A list of tuples, which contain a priority and CSS code.
A list of tuples, which contain a priority and an url pointing to CSS code.
If True (default), the element will be displayed as usual on its own.
The element's specific, inner template.
Returns a string of column width definitions.
The experiment session to which this element belongs.
Alias for
exp
Font size
A list of tuples, which contain a priority and Javascript.
A list of tuples, which contain a priority and an url pointing to JavaScript.
Unique identifier for the element.
The page to which this element belongs.
Position of the whole element on the page.
The direct parent section of this element's page.
String, giving the exact position in the experiment.
Conditions that have to be met for the element to be shown.
Dictionary of data to be passed on to jinja templates.
String, giving the exact position in the experiment.
Element width