开发者

How to reset the Flex HTML control's history

开发者 https://www.devze.com 2023-01-13 01:02 出处:网络
I am using the flex HTML component and I would like to clear the history o开发者_开发问答f the control when it is taken off screen, so that when it comes back on again the history is reset.

I am using the flex HTML component and I would like to clear the history o开发者_开发问答f the control when it is taken off screen, so that when it comes back on again the history is reset.

The only thing I can think of at the moment is to set the HTML control to a new HTML control, although this is a bit of a pain.

Thanks


The HTML control has a property named historyLength and historyPosition properties. Both allude to fact that the HTML content has a window history.

I bet you can use the domWindow property to get, and empty the history object.

htmlObject.domWindow.window.history 

More info on the history object here. Nothing says it is read only, so I bet:

htmlObject.domWindow.window.history = new Array();

But I'm half guessing; I didn't try this code.

0

精彩评论

暂无评论...
验证码 换一张
取 消