Added widgetHostBaseUrl parameter, fixed swapped parameters in call to
AppendWidgetCommand in pages.js.