I haven't dealt with OOUI for a couple of years but maybe you could pass a jQuery object to the $content parameter, store it yourself, then modify that later?
On Sun, 24 Mar 2019 at 14:14, Huji Lee <huji.h...@gmail.com> wrote: > In the script I am working on,[1] I have a PanelLayout that is defined like > this: > > this.previewResult = new OO.ui.PanelLayout({ > expanded: true, > padded: true, > framed: true, > $content: '' > }); > > Later on, I would like to modify the content of this; specifically, I want > to use MW API to retrieve the parsed output of some short wikitext. For > now, however, I just want to try out the concept by replacing the content > with a simple <p> tag. > > Evidently, this line of code does not do the trick: > > dialog.previewResult.$content = '<p>Something</p>'; > > > That is, it does update the value of the $content property for the OOUI > object, but that does not result in the object getting re-rendered. None of > the setter functions for OO.ui.PanelLayout seem to do the trick either. > > What is the correct way to do this? If PanelLayout is not the right object > type for this purpose, what is? > _______________________________________________ > Wikitech-l mailing list > Wikitech-l@lists.wikimedia.org > https://lists.wikimedia.org/mailman/listinfo/wikitech-l _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l