@SuppressWarnings("unchecked")
    public List<String> getInitScriptsToExecute() {
        List<String> initScriptsToExecute =
            (List<String>) context.getAttributes().get(EXECUTE_INIT_SCRIPTS_KEY);

        if (initScriptsToExecute == null) {
            initScriptsToExecute = new ArrayList<>(5);
            context.getAttributes().put(EXECUTE_INIT_SCRIPTS_KEY, initScriptsToExecute);
        }

        return initScriptsToExecute;
    }
@return all scripts added in the current request and called first before other scripts are executed.
primefaces/src/main/java/org/primefaces/context/PrimeRequestContext.java