support specifying class when loading widgets from the client