code: private void addGeneratedJSResource(FacesContext context, String resourceName, String library, UIViewRoot view) {
          addGeneratedResource(context, resourceName, "javax.faces.resource.Script", library, view);
      }
docs: Add a new JS resource.