fixes for url analysis
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4001 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
parent
cc99d4898e
commit
37acebc7be
|
@ -6,6 +6,15 @@
|
|||
|
||||
// A combination of interfaces NodeList, NamedNodeMap, HTMLCollection
|
||||
// implement a list of Nodes, accessible through names as well
|
||||
|
||||
note_url = function noteURL(url) {
|
||||
// hook for analysis of Web pages
|
||||
};
|
||||
|
||||
note_post_parameters = function notePostParameters(url) {
|
||||
// hook for analysis of Web pages
|
||||
};
|
||||
|
||||
function NamedNodeList() {
|
||||
var maxLength = 10;
|
||||
var local = new Array(10);
|
||||
|
@ -156,8 +165,9 @@ function Location(){
|
|||
|
||||
function DOMWindow(){
|
||||
this.name = new String();
|
||||
this.open = function window_open(url) { url.note_url(); };
|
||||
|
||||
this.open = function window_open(url, stuff) {
|
||||
note_url(url);
|
||||
};
|
||||
}
|
||||
|
||||
function DOJOObj(){
|
||||
|
@ -293,7 +303,7 @@ XMLHttpRequest = function _XMLHttpRequest() {
|
|||
|
||||
this.open = function xhr_open(method, url, async, user, password) {
|
||||
this.sUrl = url;
|
||||
url.note_url();
|
||||
note_url(url);
|
||||
this.orsc_handler();
|
||||
}
|
||||
|
||||
|
@ -303,7 +313,7 @@ XMLHttpRequest = function _XMLHttpRequest() {
|
|||
|
||||
this.send = function xhr_send(data) {
|
||||
this.orsc_handler();
|
||||
data.note_post_parameters();
|
||||
note_post_parameters(data);
|
||||
}
|
||||
|
||||
this.abort = function xhr_abort() {
|
||||
|
|
|
@ -310,14 +310,6 @@ String.prototype = {
|
|||
|
||||
loadFile: function loadFile() {
|
||||
// magic function body handled in analysis.
|
||||
},
|
||||
|
||||
note_url: function noteURL() {
|
||||
// hook for analysis of Web pages
|
||||
},
|
||||
|
||||
note_post_parameters: function notePostParameters() {
|
||||
// hook for analysis of Web pages
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -104,7 +104,7 @@ public class Generator {
|
|||
// generatePreamble(out, cb);
|
||||
|
||||
out.write("\n\ndocument.URL = new String('" + input + "');\n");
|
||||
out.write("document.URL.note_url();\n\n");
|
||||
out.write("note_url(document.URL);\n\n");
|
||||
|
||||
writeRegion(out, "Embedded Script", temp2);
|
||||
|
||||
|
|
|
@ -191,8 +191,7 @@ public class HTMLCallback implements IHtmlCallback {
|
|||
|
||||
protected void writeEventAttribute(ITag tag, String attr, String value, String varName, String varName2) throws IOException {
|
||||
if(attr.substring(0,2).equals("on")) {
|
||||
indent(); domTreeFile.write("function " + attr + "_" + varName2 + "(event) {" + value + "};\n");
|
||||
indent(); domTreeFile.write(varName + "." + attr + " = " + attr + "_" + varName2 + ";\n");
|
||||
indent(); domTreeFile.write(varName + "." + attr + " = function " + attr + "_" + varName2 + "(event) {" + value + "};\n");
|
||||
entrypointFile.write("\n\n " + varName2 + "." + attr + "(null);\n\n");
|
||||
} else if (value != null) {
|
||||
if (value.indexOf('\'') > 0) {
|
||||
|
|
Loading…
Reference in New Issue