return;
}
if (LOG.isDebugEnabled()) {
LOG.debug("Script node added: " + asXml());
}
final PostponedAction action = new PostponedAction(getPage()) {
@Override
public void execute() {
final boolean ie = getPage().getWebClient().getBrowserVersion().isIE();
if (ie) {
if (!isDeferred()) {
if (!getSrcAttribute().equals("//:")) {
setAndExecuteReadyState(READY_STATE_LOADING);
executeScriptIfNeeded(true);
setAndExecuteReadyState(READY_STATE_LOADED);
}
else {
setAndExecuteReadyState(READY_STATE_COMPLETE);
executeScriptIfNeeded(true);
}
}
}
else {
executeScriptIfNeeded(true);
}
}
};
if (postponed && getTextContent().length() == 0) {
final JavaScriptEngine engine = getPage().getWebClient().getJavaScriptEngine();
engine.addPostponedAction(action);
}
else {
try {
action.execute();
}
catch (final Exception e) {
if (e instanceof RuntimeException) {
throw (RuntimeException) e;
}