editAddress.mjs (793B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 import { createFormLayoutFromRecord } from "chrome://formautofill/content/addressFormLayout.mjs"; 6 import { EditAddressDialog } from "chrome://formautofill/content/editDialog.mjs"; 7 8 const { record, noValidate, l10nStrings } = window.arguments?.[0] ?? {}; 9 10 const formElement = document.querySelector("form"); 11 formElement.noValidate = !!noValidate; 12 createFormLayoutFromRecord(formElement, record, l10nStrings); 13 14 new EditAddressDialog( 15 { 16 title: document.querySelector("title"), 17 cancel: document.getElementById("cancel"), 18 save: document.getElementById("save"), 19 }, 20 record 21 );