added widgetVar support
fixed initWithDomReady problem