PageAssistParent.sys.mjs (657B)
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 /** 6 * JSWindowActor to pass data between PageAssist singleton and content pages. 7 */ 8 export class PageAssistParent extends JSWindowActorParent { 9 /** 10 * Get page data 11 * 12 * @returns {Promise<{ 13 * url: string, 14 * title: string, 15 * content: string, 16 * textContent: string, 17 * excerpt: string, 18 * isReaderable: boolean 19 * } | null>} 20 */ 21 async fetchPageData() { 22 return this.sendQuery("PageAssist:FetchPageData"); 23 } 24 }