开发者

How to Clear history in Adobe Air's HTML control

I am using Adobe AIR's html control in m开发者_StackOverflow社区y desktop application to let users see web pages. I am using the html.historyBack() and html.historyNext() methods to allow moving back and forth. But I want to clear the history once a specific option is selected, say a click on a button, without restarting the application. I tested both versions of AIR, 1.5.2 and AIR 2.0 Beta but unable to find any way to do so.

Is there any way to fix this problem?

Looking forward to hear from you,

Alex Fisherr


I don't think you can direct modify the history object because it's read-only. The easiest way to clear your history is to create a new HtmlLoader and replace the existing HtmlLoader.

This new HtmlLoader will have no history as desired.


If all you want to do is set the enabled state of the back and forward buttons then have a start point int, which you can reset when needed. Then base the history.length on this.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜