[wp-trac] [WordPress Trac] #23216: Create "WP Heartbeat" API
WordPress Trac
noreply at wordpress.org
Thu Jul 18 05:06:22 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 azaozz):
@carldanley thanks a lot for contributing to this. It's true it's late in
the current release cycle, probably best to concentrate on cleaning
up/locking/removing things that are not essential.
Thinking we should start by "officially" declaring this API as
experimental, meaning that it will likely change a lot in the next release
or two (depending on feedback from 3.6). During the last release cycle
there was a discussion about having some sort of "API maturity" indicator.
Seems now is a good time to start.
In addition to 23216-small-heartbeat-changes.diff thinking we can add the
function and var name changes. Perhaps instead of `connectionLost` or
`hasActiveConnection` we can call that bit `connectionError` and/or
`hasConnectionError` and drop the setter part/keep the var private.
For future iterations, few quick notes on 23216-heartbeat-cleanup.5.diff:
- The nonce has to be pulled from window.heartbeatSettings on every xhr so
we can update it when it expires (only happens on the Edit Post screen for
now).
- document.querySelectorAll() is missing in IE7 and (unfortunately) we
still support it.
- The idea to wrap private vars in an object is cool. However (call me
old-fashioned) `obj.variable` always suggests an unidentifiable scope at
first look. (In my mind simple objects are usually associated with
external scope or something like a mixin.) On the other hand it adds some
clarity when dealing with several nested scopes. Perhaps we can start
using this with the next iteration.
- Thinking we should keep the try...catch in isLocalFrame() to prevent any
possible iframe origin exceptions.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23216#comment:112>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list