@Target(value=METHOD) @Inherited @Retention(value=RUNTIME) public @interface DetectionScript
@JavaScript(source = "classpath:jquery-2.2.1.js")
public interface JQuery {
@DetectionScript("typeof jQuery !== 'undefined'")
public boolean isAvailable();
}
For each call of method of associated js-interface, the detection script will be executed.
| Modifier and Type | Required Element and Description |
|---|---|
String |
value
JavaScript code, which should be executed to detect whether script must
be injected
|
| Modifier and Type | Optional Element and Description |
|---|---|
boolean |
autoReturn
defines whether script specified by
value should be wrapped by
{code return}-statement. |
public abstract String value
Copyright © 2016. All rights reserved.