RESOLVED WONTFIX 16022
[GTK] loading scripts via src= with relative URL doesn't work
https://bugs.webkit.org/show_bug.cgi?id=16022
Summary [GTK] loading scripts via src= with relative URL doesn't work
doug turner
Reported 2007-11-16 16:19:29 PST
I am seeing some odd behavior around loading a js via the script tag. Using http, it appears that the js file referenced by the src attribute is not loaded. For example, In a js file: x = [ 1, 2, 3, ]; in a html page: <html> <script src="b.js"></script> <script> alert (x.length); </script> When running this using the GtkLauncher, I see a reference error regarding the variable "x". I also tried putting an alert in the javascript file to see if that would bring up a window, and that also failed. When loading this over a local file, it seams to work fine. I have tested this in Firefox and in the current nightly MacOS build of Webkit (r27834) and do not find the same problem. I am using r27856.
Attachments
doug turner
Comment 1 2007-11-16 16:40:13 PST
adding a http:// in front of the url seams to make this problem ago away. There is no url autocomplete.
David Kilzer (:ddkilzer)
Comment 2 2007-11-16 21:27:18 PST
But this *SHOULD* work. Reopening and marking as GTK issue.
Tommi Komulainen
Comment 3 2008-03-09 17:59:17 PDT
Tested this briefly with r30908 and seems the problem is that the following do not work: ./GtkLauncher b.html ./GtkLauncher localhost:8000/b.html but when called as below, the alert is shown as expected: ./GtkLauncher file://$PWD/b.html ./GtkLauncher http://localhost:8000/b.html
Gustavo Noronha (kov)
Comment 4 2009-03-17 17:42:40 PDT
WebKitGTK+ doesn't support broken URIs; you need to give it properly formed URIs so that it will work correctly. Browsers that want to provide the user with easy address typing should fix whatever broken URIs the user gives to it before feeding them to webkit =). GtkLauncher currently lacks code to automatically add file:// and http:// to bad URIs given to it. I am not sure we want to add such code to the launcher, though.
Note You need to log in before you can comment on or make changes to this bug.