Added support of aspect ratio and onchangeFn (through attribute)