-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
JavaScript Design Patterns
By :
Event-driven programming in JavaScript is very widespread and is the only way to handle certain scenarios. Maintaining performance and security around event listeners is of paramount importance. Mismanaged event listeners have been a historical source of bugs and critical performance issues; we’ll address this via the event delegation pattern. Secure messaging between frames and contexts has always been crucial in the context of payments. More recently, new primitives are being added to the web platform and JavaScript that exposes an event/messaging interface for maintaining isolation between contexts.
In this chapter, we’ll cover the following topics:
postMessage interface to communicate across contexts with an example of a payment iframeAt the end of this chapter, you’ll have learned how to use advanced...