IP Library Granted Patent US 8,639,743
Granted Patent B1
US 8,639,743 · App. 12/326,910 · Granted Jan 28, 2014

System and method for on-the-fly rewriting of JavaScript

Inventors: Paul Colton (Hillsborough, CA); Uri Sarid (Menlo Park, CA); Kevin Edward Lindsey (Benbrook, TX)
Assignee: Appcelerator, Inc.
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,639,743
App. No.
12/326,910
Granted
Jan 28, 2014
Kind
B1
Abstract

A method and system for on-the-fly rewriting of JavaScript is disclosed herein. On a server-side, the JavaScript of a Web-page is analyzed with a JavaScript parser and a runtime engine to identify property invocations, functions or any other JavaScript aspect of the JavaScript of the Web-page. The property invocations, functions or any other JavaScript aspect of the JavaScript of the Web-page are rewritten into a plurality of method calls to create a Web-page with instrumentation of when the method calls are executed, and the Web-page with instrumentation is transmitted to the client-side.

Claims (27)

1. A method for on-the-fly rewriting of scripting language, the method comprising:

receiving a request for a hypertext markup language (“HTML”) document at a server-side of a network;

retrieving the HTML document at the server-side;

analyzing code of the HTML document at the server-side with a parser and a runtime engine;

identifying a portion of the code of the HTML document to be rewritten, wherein the portion of the code comprises at least one aspect of a scripting language; and

rewriting the portion of the code of the HTML document into a method call of the scripting language to create an HTML document with rewritten code at the server-side by the parser and the runtime engine.

2. The method according to claim 1 , wherein the code is JavaScript code.

3. The method according to claim 2 , wherein the JavaScript code is analyzed on the server-side with a JavaScript parser and runtime engine.

4. The method according to claim 3 , wherein the step of identifying a portion of the code of the HTML document to be rewritten comprises identifying a plurality of property invocations, functions or any other JavaScript aspect of the JavaScript code of the HTML document.

5. The method according to claim 3 , wherein the step of rewriting the portion of the code of the HTML document into a method call of the scripting language to create an HTML document with rewritten code comprises rewriting the plurality of property invocations, functions or any other JavaScript aspect of the JavaScript of the HTML document into a plurality of method calls to create a webpage with instrumentation of when the method calls are executed.

6. The method according to claim 5 further comprising reporting to the server-side when one of the plurality of method calls is executed.

7. The method according to claim 5 wherein the method calls are getters and setters.

8. The method according to claim 1 further comprising transmitting the HTML document with rewritten code to a client-side.

9. The method according to claim 1 , wherein the method call of the scripting language manipulates the at least one aspect of the scripting language.

10. The method according to claim 1 , wherein the at least one aspect of the scripting language is a property of an object of the scripting language.

11. The method according to claim 1 , wherein the at least one aspect of the scripting language is a function of an object of the scripting language.

12. The method of claim 1 , wherein the step of rewriting the portion of the code into a method call of the scripting language prevents access to the at least one aspect of the scripting language other than via the method call of the scripting language.

13. The method of claim 1 , wherein the method call of the scripting language is a method call of a class of the scripting language.

14. A server for rewriting JavaScript on a server-side of a network, the server configured to:

retrieve a webpage,

analyze JavaScript of the webpage to identify at least one aspect of the JavaScript, wherein the analyzing is performed by a parser and a runtime engine at the server-side,

rewrite the at least one aspect of the JavaScript of the webpage into a method call to create a webpage with instrumentation of when the method call is executed by the parser and the runtime engine, and

transmit the webpage with the instrumentation of when the method call is executed to a client-side over the network.

15. The server according to claim 14 , wherein the at least one aspect of the JavaScript is a property of an object of the JavaScript.

16. The server according to claim 15 , wherein the webpage with the instrumentation prevents access to the at least one aspect of the JavaScript other than via the method call.

17. The server according to claim 14 , wherein the at least one aspect of the JavaScript is a function of the JavaScript.

18. The server according to claim 14 , wherein the method call is a method call of a JavaScript class.

Assignments (4)
SECURITY INTEREST Recorded Aug 27, 2015
From: APPCELERATOR, INC.
To: SILICON VALLEY BANK
Reel/Frame 036442/0008 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 5, 2012
From: COLTON, PAUL; SARID, URI; LINDSEY, KEVIN EDWARD
To: APPCELERATOR, INC.
Reel/Frame 028491/0912 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 26, 2011
From: APTANA, INC.
To: APPCELERATOR, INC.
Reel/Frame 026181/0015 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 3, 2008
From: COLTON, PAUL; SARID, URI; LINDSEY, KEVIN EDWARD
To: APTANA INCORPORATED
Reel/Frame 021916/0638 →
Continuity (1)
Provisional Application 60992705 · Dec 5, 2007