If I understand your question correctly, I think you should sub-class the HTMLViewer so that the subclassed control can be customized to handle cookie storage (a Property of type Dictionary?) and other custom Methods for any required handling.
Subclassing makes any customized logic or data you add to the HTMLViewer self-contained, when the subclassed control is then added to your UI. A subclassed custom control can be reused multiple times, where each occurrence is a separate instance (with its own internal data).
If you design your new subclassed capabilities well enough, you can hide (Private scope) or encapsulate complexity (new Public Methods) to help make each future use of your subclassed control much easier.
If you're not familiar with subclassing in Xojo, maybe this link can help UserGuide:Subclassing Examples. Also checkout Xojo's YouTube series, there is an example of subclassing a Canvas. Canvas is of course a different control than HTMLViewer, but the actions required in the IDE are basically the same.