Update appframework.ui.js

in terms of robustness, plz add the parameter af for the  Immediately-Invoked Function Expression(IIFE).