Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

So I was going through init.js and sp.js and found out that nearly all of the SharePoint OOB JS functions start with the following line: "ULSxSy:;"

For example:

function ctxInitItemState(ctxCur)
{ULSxSy:;
    ctxCur.TotalListItems=0;
    ctxCur.CurrentSelectedItems=0;
    ctxCur.LastSelectableRowIdx=0;
    ctxCur.StateInitDone=true;
}
function STSPageUrlValidation(url)
{ULSxSy:;
    return PageUrlValidation(url);
}

I could not find any documentation regarding why this might be. Anybody have an idea?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

A similar question was asked on StackOverflow earlier, here you'll find a short answer.

This answer provides the detailed information for your question.

This line

{ULSxSy:;

is inserted into functions to allow collect diagnostic information on the client which includes the ability to send a JavaScript callstack (including function name, and javascript file) back to the server.

In your case label ULSxSy correspond to function declaration

function ULSxSy(){
   var o=new Object;
   o.ULSTeamName="Microsoft SharePoint Foundation";
   o.ULSFileName="init.debug.js";
   return o;
}
share|improve this answer
    
Thanks a lot! :) –  Vardhaman Deshpande Oct 5 '12 at 12:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.