CN101122861A - Browser object, function or variable expansion method - Google Patents

Browser object, function or variable expansion method Download PDF

Info

Publication number
CN101122861A
CN101122861A CNA2007101572351A CN200710157235A CN101122861A CN 101122861 A CN101122861 A CN 101122861A CN A2007101572351 A CNA2007101572351 A CN A2007101572351A CN 200710157235 A CN200710157235 A CN 200710157235A CN 101122861 A CN101122861 A CN 101122861A
Authority
CN
China
Prior art keywords
browser
function
variable
web page
webpage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CNA2007101572351A
Other languages
Chinese (zh)
Other versions
CN100492289C (en
Inventor
田园
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fresh vision (Beijing) Technology Co., Ltd.
Original Assignee
田园
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 田园 filed Critical 田园
Priority to CNB2007101572351A priority Critical patent/CN100492289C/en
Publication of CN101122861A publication Critical patent/CN101122861A/en
Application granted granted Critical
Publication of CN100492289C publication Critical patent/CN100492289C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The present invention, which belongs to the browser technology, especially relates to a method for a browser to extend an object, a function or a variable. The invention is characterized in that the procedures include the following steps: 1) an object, a function or a variable is established; 2) a web page is loaded in the browser; 3) an event is triggered during the loading of the web page, during which the object, the function or the variable is inserted; 4) web page loading is completed and the object, the function or the variable is applied. After step 3), an error processing mechanism can be established to capture errors appearing in the running of the web page and process the errors with self-defined methods. It is unnecessary to modify the web page scripts written by the browser so that browsers of different types can call objects mutually, which saves the steps and time for modifying the web page scripts written by the browser and facilitates the mutual object call of browsers of different types.

Description

The method of a kind of browser extension object, function or variable
Technical field
The invention belongs to browser technology, particularly relate to the method for a kind of browser extension object, function or variable.
Background technology
At present,, the demand of browser application is arranged in the increasing consumer electronics product, at present, much all supported browser application in digital TV set-top box, IPTV set-top box, digital TV integrated machine and mobile phone or the like product along with the 3C arrival of convergence era.
Because the CPU processing power of consumer electronics product itself is low, memory size is limited.Some characteristics such as low-power consumption make that popular IE browser, Firefox browser etc. can't directly be applied in the consumer electronics product on PC, special built-in browser at consumer electronics product therefore occurred.
At present, built-in browser mainly contains following several:
1, iPanel built-in browser:
The iPanel built-in browser have code simplify, low to hardware requirement, portable good, be convenient to user's advantages such as exploitation of rising in value, be widely used in information appliances such as Web TV, interactive digital TV, PDA, palm PC." iPanel " is the kernel software of information household appliances.Write this software on the chip of various household electrical appliances, various functions such as just can realize surfing the web.
2, Opera built-in browser:
Opera is a kind of built-in browser.The volume of Opera is little, and it is very fast to open page speed, and operation is got up also more stable.Opear can move on a plurality of platforms, and the characteristic with most of main flow browser-safes is provided, and comprises integration search and real-time messages transmitting function, supports JavaScript, CSS form, and Email.Because the terseness of Opera, thereby many hand-held internet terminals have all selected Opera as browser.
By as can be known top, Embedded browser (for example iPanel or Opera) is fit to the application of consumer electronics product very much, but, because the extended capability of the consumer electronics product of built-in browsers such as these use iPanel and Opera is limited, be difficult to satisfy the demand of value-added service, so will solve the application extension problem with intelligent terminal.And with browsers such as IE go to browse be originally browsers such as iPanel and Opera write webpage the time because browsers such as IE do not have the built-in objects in the browsers such as iPanel and Opera, so mistake can occur.For the normal operation of browsers such as IE, need to revise the code in the browsers such as iPanel and Opera, so just have very huge workload, be very much inconvenience so utilize this method.
Summary of the invention
The present invention is intended to overcome the deficiencies in the prior art part and a kind of method that can make browser extension object, function or variable that different types of browser calls mutually is provided.
For achieving the above object, the present invention is achieved in that
The method of a kind of browser extension object, function or variable comprises the steps:
1) sets up object, function or variable;
2) browser is written into webpage;
3) firing event in the process that webpage is written into inserts object, function or variable in the process that incident produces;
4) finish the page and load application, function or variable.
As a kind of preferred version, the present invention is at completing steps 3) after, fault processing mechanism can be set up; Intercept and capture the error message of page generation in service, call customizing method and handle.
Because method of the present invention can at first be set up object, function or variable, again can be when webpage be written into, in browser control part, add EXPANDING DISPLAY AREA, function or variable, so just can not need to revise the page script that browser is write, make different types of browser allocating object mutually, saved and revised step and the time that browser is write page script, the object in the variety classes browser calls also very convenient mutually.
Description of drawings
The invention will be further described below in conjunction with the drawings and specific embodiments.Protection scope of the present invention will not only be confined to the statement of following content.
Fig. 1 is a process flow diagram of the present invention.
Embodiment
As shown in Figure 1, the method for browser extension object, function or variable comprises the steps:
1, set up object, for example: standard A ctiveX object,
Set up function, the function of javascript language description for example,
Set up variable, for example the variable of javascript language description;
2, utilize programming language to call standard method and be written into webpage with browser control part;
3, Webpage be written into or navigation procedure in the generation incident, object, function or variable that the insertion that is in due course has been set up call for Webpage, and object, function or variable are inserted the appropriate location, avoid the operation sequence problem that causes in proper order because of the script explanation;
4, set up fault processing mechanism (optional step), intercept and capture the error message of page generation in service, call customizing method and handle;
5, page invocation EXPANDING DISPLAY AREA, function or variable complete successfully webpage and load, last application, function or variable; If mistake occurs, handle being written into mistake, feedback error information.
Embodiment 1:
Be browser now with Microsoft Internet Explorer, Microsoft VisualBasic 6.0 describes as development language, but the present invention is not limited to this kind browser and development language, and the present invention is applicable to other browser and development language simultaneously.
1, set up object:
A) set up the ActiveX control engineering, with engineering called after Rtime; Write user control, and with user control called after KDT;
The user control write method specifically describes as follows:
Private?Declare?Sub?OutputDebugString?Lib″kernel32″Alias
″OutputDebugStringA″(ByVal?lpOutputString?As?String)
sub?OutputPrint(Message?as?string)
OutputDebugString“Debug:”&Message
end?sub
B) ActiveX control is compiled as Rtime.ocx; Rtime.ocx as object, is supplied
Page invocation.
2, browser calls standard method and is written into webpage:
A) create newly built construction and called after InsObj with VB6.0;
B) quote parts Microsoft HTML Object Library and Microsoft
Internet?Controls。
C) in forms, describe the WebBrowser control;
D) Navigate or the Navigate2 method of calling the WebBrowser control is written into net
Page or leaf; For example: WebBrowser1.Navigate2 " d: test.htm ".
3, the page be written into or navigation procedure in the generation incident, be in due course and insert the object set up for page invocation, object is inserted the appropriate location, avoid the operation sequence problem that causes in proper order because of the script explanation:
A) when producing the NavigateComplete2 incident, handles WebBrowser the insertion Object Operations, for example:
Private?Sub?WebBrowser_NavigateComplete2(ByVal?pDisp?As
Object,URL?As?Variant)
Dim?doc?As?IHTMLDocument2
Set?doc=pDisp.Document
Dim?e?As?IHTMLElement
Dim?s?As?IHTML?ScriptElement
Set?s=doc.createElement(″script″)
Set?e=doc.All.tags(″head″)(0)
s.Text =″var KDT=new
ActiveXObject(″″Rtime.KDT″″);″
e.insertAdjacentElement″AfterBegin″,s
End?Sub
Example is handled when WebBrowser produces the NavigateComplete2 incident and is inserted Object Operations, but is not limited thereto incident, can use other incident to carry out similar operations;
B) be InsObj.exe with engineering compiling;
C) D: the test.htm content of pages as follows:
<html>
<head>
<script language=”javascript”>KDT.
OutputDebugString(“test”)
</script>
</head>
</html>
D) so far then success finish the EXPANDING DISPLAY AREA that adds KDT by name for browser control part.
4, page invocation EXPANDING DISPLAY AREA completes successfully webpage and loads, last application:
The EXPANDING DISPLAY AREA operation of the complete call page, and carry out InsObj.exe, complete successfully webpage and load, can in tool software such as DebugTrack, check output content.
Embodiment 2:
Be browser now with Microsoft Internet Explorer, Microsoft VisualBasic 6.0 describes as development language, but the present invention is not limited to this kind browser and development language, and the present invention is applicable to other browser and development language simultaneously.
1, set up function:
A) write following script with text editor:
<SCRIPT?LANGUAGE=″JavaScript″>
function?KDT()
{
this.debug=function(strtxt)
{alert(strtxt);return;}
}
</SCRIPT>
B) above script is saved as KDT.js, for page invocation.
2, browser calls standard method and is written into webpage:
A) create newly built construction and called after InsObj with VB6.0;
B) quote parts Microsoft HTML Object Library and MicrosoftInternet Controls.
C) in forms, describe the WebBrowser control;
D) Navigate or the Navigate2 method of calling the WebBrowser control is written into webpage; For example: WebBrowser1.Navigate2 " d: test.htm ".
3, the page be written into or navigation procedure in the generation incident, be in due course and insert the function set up for page invocation, function is inserted the appropriate location, avoid the operation sequence problem that causes in proper order because of the script explanation:
A) when producing the NavigateComplete2 incident, handles WebBrowser the operation of insertion function, for example:
Private?Sub?WebBrowser_NavigateComplete2(ByVal?pDisp?As
Object,URL?As?Variant)
Dim?doc?As?IHTMLDocument2
Set?doc=pDisp.Document
Dim?e?As?IHTMLElement
Dim?s?As?IHTMLScriptElement
Set?s=doc.createElement(″script″)
Set?e=doc.All.tags(″head″)(0)
s.src=″KDT.js;″
e.insertAdjacentElement″AfterBegin″,s
End?Sub
Example is handled when WebBrowser produces the NavigateComplete2 incident and is inserted the function operation, but is not limited thereto incident, can use other incident to carry out similar operations;
B) be InsObj.exe with engineering compiling;
C) D: the test.htm content of pages as follows:
<html>
<head>
<script?language=”javascript”>KDT.debug(“test”)
</script>
</head>
</html>
D) so far then success finish the function that adds KDT by name for browser control part.
4, page invocation function completes successfully webpage and loads, last utility function:
The EXPANDING DISPLAY AREA operation of the complete call page, and carry out InsObj.exe, complete successfully webpage and load.
Embodiment 3:
Be browser now with Microsoft Internet Explorer, Microsoft VisualBasic 6.0 describes as development language, but the present invention is not limited to this kind browser and development language, and the present invention is applicable to other browser and development language simultaneously.
1, set up variable:
A) write following script with text editor:
<SCRIPT?LANGUAGE=″JavaScript″>
var?KDTFlag=1;
</SCRIPT>
B) above script is saved as KDT.js, for page invocation.
2, browser calls standard method and is written into webpage:
A) create newly built construction and called after InsObj with VB6.0;
B) quote parts Microsoft HTML Object Library and MicrosoftInternet Controls.
C) in forms, describe the WebBrowser control;
D) Navigate or the Navigate2 method of calling the WebBrowser control is written into webpage; For example: WebBrowser1.Navigate2 " d: test.htm ".
3, the page be written into or navigation procedure in the generation incident, be in due course and insert the variable set up for page invocation, variable is inserted the appropriate location, avoid the operation sequence problem that causes in proper order because of the script explanation:
A) when producing the NavigateComplete2 incident, handles WebBrowser the operation of insertion variable, for example:
Private?Sub?WebBrowser_NavigateComplete2(ByVal?pDisp?As
Object,URL?As?Variant)
Dim?doc?As?IHTMLDocument2
Set?doc=pDisp.Document
Dim?e?As?IHTMLElement
Dim?s?As?IHTMLScriptElement
Set?s=doc.createElement(″script″)
Set?e=doc.All.tags(″head″)(0)
s.src=″KDT.js;″
e.insertAdjacentElement″AfterBegin″,s
End?Sub
Example is handled when WebBrowser produces the NavigateComplete2 incident and is inserted the variable operation, but is not limited thereto incident, can use other incident to carry out similar operations;
B) be InsObj.exe with engineering compiling;
D) D: the test.htm content of pages as follows:
<html>
<head>
<script?language=”javascript”>alert(KDTFlag);
</script>
</head>
</html>
D) so far then success finish the variable that adds KDT by name for browser control part.
4, page invocation variable completes successfully webpage and loads, last application variables:
The EXPANDING DISPLAY AREA operation of the complete call page, and carry out InsObj.exe, complete successfully webpage and load.

Claims (2)

1. the method for a browser extension object, function or variable is characterized in that, comprises the steps:
1) sets up object, function or variable;
2) browser is written into webpage;
3) firing event in the process that webpage is written into inserts object, function or variable in the process that incident produces;
4) finish the page and load application, function or variable.
2. the method for browser extension object according to claim 1, function or variable is characterized in that: at completing steps 3) after, fault processing mechanism set up; Intercept and capture the error message of page generation in service, call customizing method and handle.
CNB2007101572351A 2007-09-30 2007-09-30 Method for browser expanding object, function or variable Expired - Fee Related CN100492289C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2007101572351A CN100492289C (en) 2007-09-30 2007-09-30 Method for browser expanding object, function or variable

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2007101572351A CN100492289C (en) 2007-09-30 2007-09-30 Method for browser expanding object, function or variable

Publications (2)

Publication Number Publication Date
CN101122861A true CN101122861A (en) 2008-02-13
CN100492289C CN100492289C (en) 2009-05-27

Family

ID=39085206

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2007101572351A Expired - Fee Related CN100492289C (en) 2007-09-30 2007-09-30 Method for browser expanding object, function or variable

Country Status (1)

Country Link
CN (1) CN100492289C (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103678332A (en) * 2012-09-05 2014-03-26 腾讯科技(深圳)有限公司 System, browser and method for displaying page
CN104375858A (en) * 2014-10-27 2015-02-25 深信服网络科技(深圳)有限公司 Method and device for multiple browser platforms to execute javascript
CN104520816A (en) * 2012-03-01 2015-04-15 谷歌公司 Cross-extension messaging using browser as intermediary
CN107102877A (en) * 2017-04-26 2017-08-29 国网辽宁省电力有限公司信息通信分公司 A kind of adaptive approach of browser-cross plug-in unit

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102026030A (en) * 2010-12-01 2011-04-20 福建新大陆通信科技股份有限公司 C language function calling method for STB (set-top box) script

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104520816A (en) * 2012-03-01 2015-04-15 谷歌公司 Cross-extension messaging using browser as intermediary
CN104520816B (en) * 2012-03-01 2018-05-11 谷歌有限责任公司 For adjusting method, equipment and storage media across expanding communication
CN103678332A (en) * 2012-09-05 2014-03-26 腾讯科技(深圳)有限公司 System, browser and method for displaying page
CN103678332B (en) * 2012-09-05 2018-03-02 腾讯科技(深圳)有限公司 Method for the system of displayed page, browser and its displayed page
CN104375858A (en) * 2014-10-27 2015-02-25 深信服网络科技(深圳)有限公司 Method and device for multiple browser platforms to execute javascript
CN104375858B (en) * 2014-10-27 2017-10-13 深信服网络科技(深圳)有限公司 Many browser platforms perform the method and device of javascript scripts
CN107102877A (en) * 2017-04-26 2017-08-29 国网辽宁省电力有限公司信息通信分公司 A kind of adaptive approach of browser-cross plug-in unit

Also Published As

Publication number Publication date
CN100492289C (en) 2009-05-27

Similar Documents

Publication Publication Date Title
CN102693280B (en) Webpage browsing method, WebApp framework, method and device for executing JavaScript, and mobile terminal
CN108984174B (en) Cross-platform application creation method, device, server and storage medium
CN100492289C (en) Method for browser expanding object, function or variable
KR20160061305A (en) Method and apparatus for customized software development kit (sdk) generation
CN103092581A (en) Method and device for setting up Web front-end local development environment
CN102023856A (en) Method for outputting and operating data at server in formatting way according to demands of user
CN103618936A (en) Smart television, as well as method and device for pre-downloading link pages in browser of smart television
Guan et al. Design and implementation of an embedded web server based on ARM
CN101957756A (en) System and method for rapidly generating intelligent mobile terminal program
CN102693238B (en) Widget application process, system and multimedia terminal
CN103443763A (en) ISA bridging including support for call to overidding virtual functions
CN109445773A (en) A kind of language based on programming promotes the method and electronic equipment of browser performance
CN110795181A (en) Application program interface display method and device based on skip protocol and electronic equipment
CN101799766A (en) Method and device for analyzing script file by using third engine in Widget engine
TWI420327B (en) Method and related apparatus and website accessing system capable of enhancing website capability
CN101408840A (en) Method capable of calling different browser objects
CN102566481B (en) C language-based PLC (Programmable Logic Controller) control system and realization method thereof
CN101533409B (en) Network browser system and control method
CN101452449A (en) Method for invoking web page with each other between different browsers
CN102298521A (en) Mobile internet application system based on cross-platform browsing technology
EP3519964B1 (en) Electronic apparatus for recording debugging information and control method thereof
CN103067464B (en) Intelligent terminal method for remote controlling computer and system
TW201504818A (en) Webpage content browsing method, apparatus and terminal device thereof
CN111488152B (en) Application program page previewing method, related device and system
CN106201593A (en) A kind of startup method and device of application program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Assignee: Shenyang Jinding Electronic Digital Family Technology Co., Ltd.

Assignor: Tian Yuan

Contract fulfillment period: 2009.12.14 to 2015.12.13 contract change

Contract record no.: 2009210000305

Denomination of invention: Browser object, function or variable expansion method

Granted publication date: 20090527

License type: Exclusive license

Record date: 20091225

LIC Patent licence contract for exploitation submitted for record

Free format text: EXCLUSIVE LICENSE; TIME LIMIT OF IMPLEMENTING CONTACT: 2009.12.14 TO 2015.12.13; CHANGE OF CONTRACT

Name of requester: SHENYANG JINDING DIGITAL HOME ELECTRONICS TECHNOLO

Effective date: 20091225

ASS Succession or assignment of patent right

Owner name: FRESHVIEW (BEIJING) TECHNOLOGIES CO., LTD.

Free format text: FORMER OWNER: TIAN YUAN

Effective date: 20110722

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 110015 NO. 124, NANTA STREET, DONGLING DISTRICT, SHENYANG CITY, LIAONING PROVINCE TO: 100048 ROOM 501, BUILDING 4, NO. 9, SHOUTI SOUTH ROAD, HAIDIAN DISTRICT, BEIJING

TR01 Transfer of patent right

Effective date of registration: 20110722

Address after: 100048 Beijing city Haidian District Road No. 9 Building No. 4 Room 501

Patentee after: Fresh vision (Beijing) Technology Co., Ltd.

Address before: South Street in Dongling District of Shenyang city of Liaoning Province, No. 124 110015

Patentee before: Tian Yuan

EC01 Cancellation of recordation of patent licensing contract

Assignee: Shenyang Jinding Electronic Digital Family Technology Co., Ltd.

Assignor: Tian Yuan

Contract record no.: 2009210000305

Date of cancellation: 20120418

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090527

Termination date: 20160930