Expose the options for widgets called in mainline code. #1687
Description
Basically all the jQuery Mobile widgets like jquery.mobile.page.js
and jquery.mobile.forms.button.js
(10 of them in all) have fungible options that the developer cannot easily reach because these widgets are invoked in mainline jQuery Mobile code.
Background: the canonical way jQuery-UI widget options work is at invocation time, for example $( selector ).button( { ... options ...} )
as the widget is being created. These junctures in jQuery Mobile are buried.
Another way jQuery-UI widget options work is on an instance basis, for example $( selector ).button( "option", { ... options ...} )
changes an existing button. This is a problem for jQuery Mobile because some of our widgets are very DOM intensive, and it's not clear that this would even work in some cases, for example adding a back button to an existing page via `.page( "option", { addBackBth: true } ).
The best I could come-up with to globally enable back buttons (for example) is $.mobile.page.prototype.option( { addBackBtn: true } );
or $.mobile.page.prototype.options.addBackbutton= true;
The alternative to this is a long multiline pagebeforeshow
hook that's a suboptimal kluge since this should be a fungible option.