Login Register

null

Error: dojo.body() is null or not an object !!

I have web application built on JSP, with dojo included on each page it is used (almost every page).
If during browsing i am not waiting for pages to fully load and navigate to another one,
dojo throws a java script exception


"Error: dojo.body() is null or not an object"

As far as i understand dojo thinks it is loaded but navigating to another page spoils it's plannes.

this function throws this

onload: function(){
// summary:
// Function that detects if we are in high-contrast mode or not,

shrinksafe fails completely with a regex pattern

The presence of this regex pattern in my script (broken into two lines for display here):

var patt=/((ftp:\/\/|http:\/\/|https:\/\/|ftp:\/\/www\.|http:\/\/www\.|https:\/\/www\.|www\.)
(([A-Za-z0-9$_.+!*(),;/?:@&~=-])|%[A-Fa-f0-9]{2}){2,}(#([a-zA-Z0-9][a-zA-Z0-9$_.+!*(),;/?:@&~=%-]*))?([A-Za-z0-9$_+!*();/?:~-]))/gi;

which matches urls, causes Shrinksafe to output "null" for the entire script. I have tested with this line alone as well, and again, Shrinksafe outputs "null". Is this a known issue, and is there a workaround? thanks.

emichael

Syndicate content