==============
WebPayments UI
==============
User Interface for the WebPayments `Payment Request API `_ and `Payment Handler API `_.
JSDoc style comments are used within the JS files of the component. This document will focus on higher-level and shared concepts.
.. toctree::
:maxdepth: 5
Debugging
=========
Set the pref ``dom.payments.loglevel`` to "Debug".
To open a debugger in the context of the remote payment frame, run the following while the dialog is the most recent window::
gDevToolsBrowser.openContentProcessToolbox({
selectedBrowser: Services.wm.getMostRecentWindow(null).document.getElementById("paymentRequestFrame").frameLoader,
})
To open the debugging console in the dialog, use the keyboard shortcut **Ctrl-Alt-d (Ctrl-Option-d on macOS)**.
Communication with the DOM
==========================
Communication from the DOM to the UI happens via the `paymentUIService.js` (implementing ``nsIPaymentUIService``).
The UI talks to the DOM code via the ``nsIPaymentRequestService`` interface.
Dialog Architecture
===================
Privileged wrapper XHTML document (paymentDialog.xhtml) containing a remote ``