摘要
面向数字电视的嵌入式浏览器通常向业务开发者提供具备本地功能的JavaScript接口开发业务,在浏览器实现时多采用静态扩展接口、将组件库与浏览器一起编译链接的方式,该方法易造成嵌入式浏览器冗余、不灵活等问题。为解决此问题,本文设计了一种基于动态查找的嵌入式浏览器扩展接口的方法。该方法中设计了接口扩展框架、通用接口扩展模块、组件库管理模块和组件库客户端,定义了通用JavaScript接口、通用接口和组件库载入接口,独立于浏览器内核外实现了浏览器动态扩展接口、动态查找组件并绑定组件功能。此方法经实践证明可加速第三方应用的开发和部署,减少了浏览器静态扩展接口和绑定组件库的工作量,并降低了资源消耗。
The embedded browser for digital television which gaves custom JavaScript API for native functions, usually implemented by extending JavaScript API statically, including and compiling source codes of components, linking with component library, will be large and inflexible. To solve this problem, this paper proposed a method to extend JavaScript API by dynamic searching. Through adding modules such as API extend framework, common API extend module,component libraries management module, component client module, and designing APIs such as common JavaScript API,common API, component library loading API. It can be independent of the browser's kernel supports to extend JavaScript API, which finding and loading components dynamically. Practical application shows that this method accelerates the development of apps,reducing the work of browser extend JavaScript API and binding components, decreasing resource consumption.
出处
《网络新媒体技术》
2016年第3期44-48,共5页
Network New Media Technology
基金
863项目"动态媒体的多元适配与耦合技术研究"(No.2015AA015802)
中科院先导专项课题"智能电视平台与服务支撑环境研制"(No.XDA06040501)