[wp-trac] [WordPress Trac] #23216: Create "WP Heartbeat" API
WordPress Trac
noreply at wordpress.org
Wed Jul 17 17:01:21 UTC 2013
#23216: Create "WP Heartbeat" API
--------------------------------------+-----------------------
Reporter: azaozz | Owner:
Type: task (blessed) | Status: reopened
Priority: normal | Milestone: 3.6
Component: Administration | Version:
Severity: normal | Resolution:
Keywords: autosave-redo needs-docs |
--------------------------------------+-----------------------
Comment (by wonderboymusic):
the Revealing Module Pattern is one of the only ways to actually make
methods actually private, would also delete the need for dangling _, which
every linter complains about - otherwise, nothing stops API._imPrivate
from being called, this would:
{{{
var JS_Class = (function () {
function privateFunc() {}
function publicFunc() {
privateFunc();
}
return {
publicFunc : publicFunc
};
}());
}}}
OR
{{{
(function () {
function unreachable() {
}
function JS_Class() {
function whatever() {
unreachable();
}
}
window.JS_Class = JS_Class;
}());
}}}
OR
{{{
var JS_Class = (function () {
function privateFunc() {}
return {
publicFunc : function () {
if (window.authorized)
privateFunc();
doOtherstuff();
}
}
}());
}}}
I think it is a little absurd that a rewrite is even being entertained
during RC.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23216#comment:103>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list