You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.
oatkiller edited this page Sep 13, 2010
·
2 revisions
use it on a function to get a verison of the function that only runs the first time
(function () {
var get_a_div = function () {
return document.createElement('div');
}[o.call_once]();
var my_div = get_a_div(), // returns a new div
// returns the same div again,
// as the function is called only once
my_same_div = get_a_div();
my_div === my_same_div; // true.
})();