[wp-trac] [WordPress Trac] #20811: Theme Customizer: Fix race condition in previewer and use message channels

WordPress Trac wp-trac at lists.automattic.com
Fri Jun 1 19:48:22 UTC 2012


#20811: Theme Customizer: Fix race condition in previewer and use message channels
--------------------------+-------------------------
 Reporter:  koopersmith   |      Owner:  koopersmith
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  3.4
Component:  Appearance    |    Version:  3.4
 Severity:  major         |   Keywords:
--------------------------+-------------------------
 In the customizer, if any settings are updated via JS (postMessage or
 otherwise) after a request is sent, the request becomes immediately
 outdated. This creates a race condition between the request and any JS-
 specific changes applied after the request is sent. To solve this problem,
 we should send the updated values to the preview frame once it renders.

 This, however, requires several other things. First, it requires the
 preview frame to send a ready event to the parent once it has rendered.
 Second, it requires us to be able to distinguish messages across the same
 connection but sent to different windows. To control this, we can add a
 channel parameter to the Messenger object.

 In general, this also has the beneficial side effect of making preview
 requests more robust.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20811>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list