开发者

Text search in an AIR HTML Control

What are the different op开发者_StackOverflowtions available for implementing a text search in an AIR HTML control? I could think of the following two:

  1. Implement by injecting a custom javascript - the downside is the script may interfere with ones already loaded with page
  2. Implement an HTML scraper and then parse this text in Actionscript, and then using javascript highlight it.

Thoughts are most welcome.


The best way to perform text search in an HTML control via actionscript is to look for text nodes, extract them, perform a match, and then break the text node into 3 separate nodes: 1. The text node with part before 2. A new highlighted node with search term 3. The text node with the part after.


here's a start: Using HTML in Flex-based Adobe AIR Applications. there's a section on calling javascript.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜