public marks

PUBLIC MARKS from decembre with tags function & tutoriel


JAVASCRIPT - Jscript - Named function expressions demystified

In a nutshell, named function expressions are useful for one thing only — descriptive function names in debuggers and profilers. Well, there is also a possibility of using function names for recursion, but you will soon see that this is often impractical nowadays. If you don’t care about debugging experience, you have nothing to worry about. Otherwise, read on to see some of the cross-browser glitches you would have to deal with and tips on how work around them.


unsafeWindow - Injecting JS functions into the page from a Greasemonkey script on Chrome - Stack Overflow

I have a Greasemonkey script that works just fine in Firefox and Opera. I struggle with getting it to work in Chrome, however. The problem is injecting a function into the page that can be invoked by code from the page. Here's what I'm doing so far: First, I get a helper reference to the unsafeWindow for Firefox. This allows me to have the same code for FF and Opera (and Chrome, I thought).

decembre's TAGS related to tag function

chrome +   code +   css +   declaration +   design +   dev +   example +   exemples +   extension +   fonction +   google +   Google:Chrome +   greasemonkey +   hack +   howto +   javascript +   jscript +   Korben +   meyer +   object +   property +   propriéte +   script +   syntax +   test +   tips +   tutorial +   tutoriel +   unsafeWindow +   web +   webdesign +