code: public static boolean isInitialized(final String scriptname) {
      final boolean loaded = JsResources.rememberEvent != null || StringUtils.isEmpty(scriptname);
      return loaded || JsResources.isInHeader(scriptname);
    }
docs: check if script is available and initialized.
  
  @return true if it exists