DragSourceParentContext.sys.mjs (1166B)
1 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ 2 /* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 5 6 import { DragParentContextBase } from "./DragParentContextBase.sys.mjs"; 7 8 /* global content */ 9 export class DragSourceParentContext extends DragParentContextBase { 10 constructor(aBrowsingContext, aParams, aSpecialPowers) { 11 super("dragSource", aBrowsingContext, aParams, aSpecialPowers); 12 } 13 14 initialize() { 15 return this.runRemoteFn( 16 params => { 17 let { createDragSourceChildContext } = ChromeUtils.importESModule( 18 "chrome://mochikit/content/tests/SimpleTest/DragSourceChildContext.sys.mjs" 19 ); 20 // eslint-disable-next-line no-undef 21 createDragSourceChildContext(content.window, params, ok, is, info); 22 }, 23 [this.params] 24 ); 25 } 26 27 checkMouseDown() { 28 return this.runRemote("checkMouseDown"); 29 } 30 31 checkDragStart() { 32 return this.runRemote("checkDragStart"); 33 } 34 35 checkDragEnd() { 36 return this.runRemote("checkDragEnd"); 37 } 38 }