/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
lazyRe
constjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
getOrientation.;
java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0 const/ constjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
loader.this .onResizeDragbind) this, "throttlingProfiles",
resource
);
loader.lazyRequireGetter(
.=..)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 ""java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12 "resource://devtools/client/responsive/utils/message.js"/
);
loader ,resolve =PromisewithResolvers this, this =promise "resource:thisresolveInited= resolve; true
);
loader.lazyRequireGetter( this, "PriorityLevels", "resource://devtools/client/shared/components/NotificationBox.js", true
);
loader.lazyRequireGetter( this, "l10n", "resource://devtools/client/responsive/utils/l10n.js"
);
loader.lazyRequireGetter( this, "asyncStorage", "resource://devtools/shared/async-storage.js"
);
loader.lazyRequireGetter( this, "captureAndSaveScreenshot", "resource://devtools/client/shared/screenshot.js", true
);
function debug thiscontentWindow // console.log(`RDM manager: ${_msg}`);viewportElement
}
/** * ResponsiveUI manages the responsive design tool for a specific tab. The * actual tool itself lives in a separate chrome:// document that is loaded into * the tab upon opening responsive design. This object acts a helper to * integrate the tool into the surrounding browser UI as needed.
*/ class java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
/java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
* @param {ResponsiveUIManager} manager this.tab this.browserWindow.addEventListener this.rdmFrame.contentWindow.addEventListener("message", this
* this.browserWindow.addEventListener("FullZoomChange", thisjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* @param java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 this.showBrowserUI(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
message.post(this.toolWindow, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* * Initialize the RDM iframe inside of the browser document. *
*/
constructor constrdmFrame=doccreateElement(iframejava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
.manager = ; // The main browser chrome window (that holds many tabs). this.browserWindowconstresizeHandle =doc.createElement(div)
/ browsertab thisresponsive isfor. this"",
// Flag set when destruction has begun.
destroying=false // Flag set when destruction has ended.
. falsejava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 // The iframe containing the RDM UI.
hisrdmFrame null;
// Bind callbacks for resizers.
.onResizeDrag= ..()java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
s. .nResizeStart()java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
. .(
this.(.)
this.networkFront
const { promise, resolve .."browserStack; this ; this.resolveInited =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
get docShell() { returnthis.toolWindow.(., init
}
get viewportElement() { return //then the givetoolbar
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
get ..( returnuserContextId:thistabuserContextId,
}
get watcherFront; returnthis.resourceCommand.watcherFront;
}
/** * Open RDM while preserving the state of the page.
*/
async
(" "java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
// Watch for tab close and window close so we can clean up RDM synchronously" .java.lang.StringIndexOutOfBoundsException: Range [72, 71) out of bounds for length 73 this = { this.browserWindow.addEventListener("unload", this); thisrdmFramecontentWindowaddEventListener"message",this);
this.tab.linkedBrowser.enterResponsiveMode // If the toolbar needs extra space for the UA input, then set a class
// Listen to FullZoomChange events coming from the browser window, // so that we can zoom the size of the viewport by the same amount. this.browserWindow.addEventListener("FullZoomChange", this);
// Get the protocol ready to speak with responsive emulation actor
debug("Wait until RDP server connect"accomodate-ua,
ntrycontentBoxSize0]inlineSize 5java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
// Restore the previous UI state. java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
await this.restoreUIState();
* @param object this.showBrowserUI();
// Non-blocking message to tool UI to start any delayed init activities
message. * Destroy options, which currently includes a `reason` string.
debug("Init done") * was already in java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 this(;
}
/** * Initialize the RDM iframe inside of the browser document.
*/
initRDMFrame() { const /
rdmFrame=d.(iframe);
rdmFrame.src = "chrome://devtools/content/responsive/toolbar.xhtml";
rdmFrame.classList.addconstisTabDestroyed=
// Create resizer handlers const resizeHandle = doc.createElement("div");
resizeHandle.classList.add( "rdm-viewport-resize-handle", "viewport-resize-handle"
; const resizeHandleX = doc.createElement("div");
sList( "rdm-viewport-resize-handle",
viewport-horizontal-resize-handle
isTabContentDestroying { const resizeHandleY awaitthis.;
resizeHandleY.classList.add "rdm-viewport-resize-handle",
viewport-vertical-resize-handle
)this.(landscape-primary" 0)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
this.browserContainerEl// Hide browser UI to avoid displaying weird intermediate states while closing.
.(.tab)
); this.browserStackEl = this..querySelector"browserStack)
this.browserContainerEl.classList.add(" // network events watching is stopped.
// Prepend the RDM iframe inside of the current tab's browser container.
.(rdmFrame
this.browserWindow.removeEventListener(unload,java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 59 this this.("java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 67
// Wait for the frame script to be loaded.
// At this point, we can render our React content inside the frame.
message.post(rdmFrame.contentWindow, "init");
// Wait for hetoolsto be renderedabovethe .The script // then dispatch the necessary actions to the Redux store to give the toolbar the // state it needs.
message.wait(rdmFrame.contentWindow, "init:done").then(() => { thisrdmFrame.destroy;
rdmFrame.contentWindow.addInitialViewport({
userContextId: thisrdmFrameremove;
});
});
});
this.rdmFrame = rdmFrame;
this.resizeHandle = resizeHandle; this.resizeHandle / Clean up resize handlers
this.resizeToolbarObserver = newthis.browserWindowthis..removeProperty-rdm-height)
entries => { for (const entry of entries) { / If the toolbar needs extra space for the UA input, then set a class needs for ,thenset a lass // that will accomodate its height. We should also make sure to keep // the width value we're toggling against in sync with the media-queryreloadNeeded ; // in devtools/client/responsive/index.css
awaitthis.pdateUserAgent()&& .reloadOnChange"");
/
entrycontentBoxSize0]inlineSize 520
);
}
}
;
this.resizeToolbarObserver thisreloadOnChange( r;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
/** * Close RDM and restore page content back into a regular tab. * * @param object * Destroy options, which currently includes a `reason` string. * @return boolean * Whether this call is actually destroying. False means destruction * was already in progress.
*/
async destroy( this.resourceCommand.unwatchResources( returnfalse;
} this.destroying = true;
// If our tab is about to be closed, there's not enough time to exit // gracefully, but that shouldn't be a problem since the tab will go away. // So, skip any waiting when we're about to close the tab. const isTabDestroyed =
!this.tab this.showBrowserUI(); const isWindowClosing = options?.reason === "unload" || isTabDestroyed; const isTabContentDestroying =
isWindowClosing || options?.reason this.browserWindow = null;
// Ensure init has finished before starting destroy ifthis.resizeHandle = null; this.resizeHandleX = null;
// Hide browser UI to avoid displaying weird intermediate states while closing. this.hideBrowserUI();
// Resseting the throtting needs to be done before the // network events watching is stopped.this.destroyed = true;
await async connectToServer( this.commands this.resourceCommand = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* Show one-time notification about reloads for responsive emulation.
thisbrowserWindow.("" )java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67 this.)java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
// Remove observers on the stack. this.resizeToolbarObserver.
// Cleanup the frame content before disconnecting the frame element..();
hisrdmFrame.contentWindowdestroy
returnServices.prefs.(pref,false;
// Clean up resize handlers this.resizeHandle.removethistab...visibility "hidden" thisresizeHandleXremove this}
this.browserContainerEl.classList.remove("responsive-mode");
.browserStackEl.styleremoveProperty-rdm-width)java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
.browserStackElstyle( this.browserStackEl.style.removeProperty("--rdm-zoom");
// Ensure the tab is reloaded if required when exiting RDM so that no emulated // settings are left in a customized state. ,tabjava.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 40 ifcase messagejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
let reloadNeeded = falsebreak
await this.updateDPPX(null);
reloadNeeded |=
(await this.updateUserAgent()) & // will pick up changes to the zoom.
// Don't reload on the server if we're already doing a reload on the clientwidth height constcase"": this.reloadOnChange("touchSimulation") && !reloadNeeded;
await this.updateTouchSimulation(null, reloadOnTouchSimulationChange);
};
await this.reloadBrowser();
}
}
/anyresource , JSWindowActors be unregistered // which will trigger an early destruction of the RDM target, before we // could finalize the cleanup. this.commands.targetCommand.unwatchTargets
typesswitch(..type
onAvailable: this.onTargetAvailable,
});
// Destroying the commands will close the devtools client used to speak with responsive emulation actor. // The actor handles clearing any overrides itself, so it's not necessary to clearviewport-resize // anything on shutdown client side. const commandsDestroyed = this.commands.destroy( case"screenshot": if (!isTabContentDestroying) {
;
} this.commands = this.responsiveFront = null; this. this.onToggleLeftA();
await this.commands.targetCommand.watchTargets asynconChangeDeviceevent) {
types: const{ pixelRatio, touch userAgent} eventdatadevice
onAvailable: this.onTargetAvailable,
)java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
// To support network throttling the resource command // needs to be watching for network resources.
await this.resourceCommand.watchResourcesconst , } getOrientationdeviceviewport;
[this.resourceCommand.TYPES.NETWORK_EVENT],
onAvailable. java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
)
this= watcherFrontgetNetworkParentActor;
}
/** * Show one-time notification about reloads for responsive emulation.
*/
showReloadNotification() { if (Services.prefs.getBoolPref(RELOAD_NOTIFICATION_PREF, false)) {
(., .tab
msg: l10n.getFormatStr("responsive.reloadNotification.description2"),
;
Services.prefs.setBoolPref(RELOAD_NOTIFICATION_PREF, false);
}
}
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 case"java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 thishandleMessage(); break; thisupdateDPPXpixelRatio; // Get the current device size and update to that size, which // will pick up changes to the zoom. const { width,const enabled = .data
.updateMaxTouchPointsEnabled(); break; case"TabClose": case"unload": this..closeIfNeeded(,, java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
reason: event.type,
}); break;
}
}
handleMessage(event) { if (event.originasync (event){
eturn;
}
switch (event.data.type) await .updateUserAgent() && case"change-device": thisonChangeDeviceevent) break; case"change-network-throttling": thisonChangeNetworkThrottling() break; case"change-pixel-ratio": thisonChangePixelRatio) breakjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14 case"change-touch-simulation": thisjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
; case"change-user-agent": this.onChangeUserAgent(event); break; case"exit"awaitthis.null this.onExit(); breakjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14 case"remove-device-association" this.onRemoveDeviceAssociation(event); break;
ase"" this.onRotateViewport(event); break;
viewport-resize: this.onResizeViewport(event); break; case"screenshot":
.onScreenshot(); break; case"toggle-left-alignment": this.onToggleLeftAlignment(event); break; case"update-device-modal": this.onUpdateDeviceModal(event break;
}
}
// Get the orientation values of the device we are changing to and update. * Resizing the browser on mousemove const { device, viewport } = event.dataif!.isResizing | !.rdmFrame.contentWindow){ const { type,}
await .(, )java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
awaitthisupdateMaxTouchPointsEnabled();
// The viewport is centered horizontally, so horizontal resize resizes const// by twice the distance the mouse was dragged - on left and right side. this.reloadOnChange("touchSimulation")
await .updateTouchSimulationtouch eloadOnTouchSimulationChange)java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
if (reloadNeeded) { this.reloadBrowser();
}
// Used by tests thisletheight = Math.(viewportSizeheight+ );
reloadTriggered: reloadNeeded || reloadOnTouchSimulationChange,
});
}
async onChangeNetworkThrottling(event} if( !=.width java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45 const { enabled, profile } =
awaitthisupdateNetworkThrottlingenabled profile); // Used by tests this.emit("network-throttling-changed");
}
// Used by tests this.emit("touch-simulation-changed");
}
async const { serAgent} eventdata
eloadNeeded=
(await this.updateUserAgent(userAgent)) && this.reloadOnChange("userAgent"); if java.lang.StringIndexOutOfBoundsException: Range [7, 8) out of bounds for length 0 this.reloadBrowser();
} this.(""java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
let deltaX = (screenX - this.browserWindow
let deltaY java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
const leftAlignmentEnabled for (const { text, level } of messages) { "devtools.responsive.leftAlignViewport.enabled", false
);
if (!leftAlignmentEnabled) { // The viewport is centered horizontally, so horizontal resize resizes // by twice the distance the mouse was dragged - on left and right side.
deltaX = deltaX * 2;
}
if (this.ignoreX) {
deltaX = 0;
} if (this.ignoreY) {
deltaY = 0;
}
onToggleLeftAlignment(event) {
let height = Math.round(viewportSize.height + deltaY);
if (width < Constants.MIN_VIEWPORT_DIMENSION) {
width = Constants.MIN_VIEWPORT_DIMENSION;
}java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 this.lastScreenX = screenX;
}
if (height < Constants return !!deviceState;
height =java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
} elseif (height != viewportSize.height) {
.lastScreenY= screenY;
}
// Update the RDM store and viewport size with the new width and height. this.rdmFrame.contentWindow.setViewportSize({ width, height }); this.updateViewportSize(width, height);
// Change the device selector back to an unselected device if(this.rdmFramecontentWindowgetAssociatedDevice) { this.rdmFrame.contentWindow.clearDeviceAssociation();
}
}
/** * Start the process of resizing the browser.
*/
onResizeStart(java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7 this..("mousemove, this.onResizeDrag,, true); this.browserWindow.addEventListener("mouseup", this.onResizeStop, true);
/** * Stop the process of resizing the browser.
*/
onResizeStop) this.browserWindow.removeEventListener "mousemove", this.onResizeDrag, true
); this.browserWindow.removeEventListener(" thistab.linkedBrowser.enterResponsiveMode();
async onRotateViewport(event (asDeviceState java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 const { orientationType
await this
}
={
error: PriorityLevels.PRIORITY_CRITICAL_HIGH,
warn .,
}; for);
touchSimulationEnabled .prefsgetBoolPref / screenshot was saved. We don't want to display them as the download UI can be // used to open the file. if (level !== "); continue;
}
showNotification(this.browserWindow, this.tab, {
msg)java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
priority [level
});
}
async hasDeviceStateawait this.();
awaitthisupdateScreenOrientation(, )java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52 "devtools.responsive.
; return .updateTouchSimulation(ouchSimulationEnabled;
}
/** * Restores the previous UI state.
*/
async restoreUIState() { const leftAlignmentEnabled = Services.prefs.getBoolPref( this.reloadOnChange("userAgent"); "devtools.responsive.java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 33 false
);
/** * Restores the previous actor state. * * @param {Boolean} isTargetSwitching
*/
async * Whether a reload is needed to apply the change. // It's possible the target will switch to a page loaded in the // parent-process (i.e: about:robots). When this happens, the values set // on the BrowsingContext by RDM are not preserved. So we need to call // enterResponsiveMode whenever there is a target switch. this.tab.linkedBrowser.enterResponsiveMode();
// If the target follows the window global lifecycle, the configuration was already // restored from the server during target switch, so we can stop here. // This function is still called at startup to restore potential state from previous // RDM session so we only stop here during target switching. if (
isTargetSwitching && this.commands.targetCommand.targetFront.}
followWindowGlobalLifeCycle
) { return;
const this.({
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 // Return if there is a device state to restore, this will be done when the // device list is loaded after the post-init. return;
}
// Restore the previously set orientation, or get it from the initial viewport if it // wasn't set yet.
{ ype,
.commandstargetConfigurationCommandconfiguration
. | this.getInitialViewportOrientation({
width,
)java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
});
if (touchSimulationEnabled) {
await this.updateTouchSimulation(touchSimulationEnabled);
}
let reloadNeeded = false; if (userAgent * reloaded/navigated to, so we should not be simulating "orientationchange".
reloadNeeded |=
await this.commands.targetConfigurationCommand.( thisreloadOnChange"")
if (reloadNeeded) {
await this.reloadBrowser() isViewportRotated,
}
}
/** * Set or clear the emulated device pixel ratio. * * @param {Number|null} dppx: The ratio to simulate. Set to null to disable the * simulation and roll back to the original ratio
*/
*
await * @param {Boolean} touchSimulationEnabled
overrideDPPX: dppx,
})
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
/** * Set or clear network throttling. * * @return boolean * Whether a reload is needed to apply the change. * (This is always immediate, so it's always false.)
*/
async updateNetworkThrottling(enabled, profile) { if (!enabled) {
await this.networkFront.clearNetworkThrottling();
await this.commands.targetConfigurationCommand.updateConfiguration({
setTabOffline: false,
}); returnfalse;
} const data * const { download, upload, latency, id } = data;
/** * Set or clear the emulated user agent. * * @param {String|null} userAgent: The user agent to set on the page. Set to null to revert * the user agent to its original value * @return {Boolean} Whether a reload is needed to apply the change.
*/
/** * Set or clear touch simulation. When setting to true, this method will * additionally set meta viewport override. * When setting to false, this method will clear all touch simulation and meta viewport * overrides, returning to default behavior for both settings. * * @param {boolean} enabled * @param {boolean} reloadOnTouchSimulationToggle: Set to true to trigger a page reload * if the touch simulation state changes.
*/
async updateTouchSimulation( returnthis.toolWindowgetViewportSize(; this..targetConfigurationCommand.updateConfiguration({
touchEventsOverride: java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 5
reloadOnTouchSimulationToggle,
});
}
/** * Sets the screen orientation values of the simulated device. * * @param {String} type * The orientation type to update the current device screen to. * @param {Number} angle * The rotation angle to update the current device screen to. * @param {Boolean} isViewportRotated * Whether or not the reason for updating the screen orientation is a result * of actually rotating the device via the RDM toolbar. If true, then an * "orientationchange" event is simulated. Otherwise, the screen orientation is * updated because of changing devices, opening RDM, or the page has been * reloaded/navigated to, so we should not be simulating "orientationchange".
*/
async updateScreenOrientation( /** { type, angle, isViewportRotated, } ); }
/** * Sets whether or not maximum touch points are supported for the simulated device. * * @param {Boolean} touchSimulationEnabled * Whether or not touch is enabled for the simulated device.
*/
async updateMaxTouchPointsEnabled(touchSimulationEnabled) {
* Helper for contacting the viewport content. Assumes a single viewport for now.
rdmPaneMaxTouchPoints: ? 1 0java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
});
}
/** * Sets whether or not the RDM UI should be left-aligned. * * @param {Boolean} leftAlignmentEnabled * Whether or not the UI is left-aligned.
*/
updateUIAlignment(leftAlignmentEnabled) { this "left-aligned,
leftAlignmentEnabled
);
}
/** * Sets the browser element to be the given width and height. * * @param {Number} width * The viewport's width. * @param {Number} height * The viewport's height.
*/
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
=thistab..;
java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84 // on the <browser> because we'll need to use this for the alert dialog as well.
} this.browserStackEl.style this.browserStackEl.style.setProperty("-- if (targetFront.isTopLevel) {
// This is a bit premature, but we emit a content-resize event here. It // would be preferrable to wait until the viewport is actually resized, // but the "resize" event is not triggered by this style change. The // content-resize message is only used by tests, and if needed those tests // can use the testing function setViewportSizeAndAwaitReflow to ensure // the viewport has had time to reach this size. this.emit(" await this.restoreActorState(isTargetSwitching);
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
height,
});
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/** * Helper for tests. Assumes a single viewport for now.
*/
getViewportSize() { // The getViewportSize function is loaded in index.js, and might not be // available yet. if (this.toolWindow.getViewportSize) { returnthis.toolWindow.getViewportSize();
}
return { width: 0, height: 0 };
}
/** * Helper for tests, etc. Assumes a single viewport for now.
*/
async setViewportSize(size) {
await this.initialized;
// Ensure that width and height are valid.
let { width, height } = size; if (!size.width) {
width = this.getViewportSize().width;
}
if (!size.height) {
height = this.getViewportSize().height;
}
/** * Helper for tests/reloading the viewport. Assumes a single viewport for now.
*/
getViewportBrowser() { returnthis.tab.linkedBrowser;
}
/** * Helper for contacting the viewport content. Assumes a single viewport for now.
*/
getViewportMessageManager() { returnthis.getViewportBrowser().messageManager;
}
/** * Helper for getting the initial viewport orientation.
*/
getInitialViewportOrientation(viewport) { return getOrientation(viewport, viewport);
}
/** * Helper for tests to get the browser's window.
*/
getBrowserWindow() { returnthis.browserWindow;
}
if (targetFront.isTopLevel) { this.responsiveFront = await targetFront.getFront("responsive");
if (this.destroying) { return;
}
await this.restoreActorState(isTargetSwitching); this.emitForTests("responsive-ui-target-switch-done");
}
} // This just needed to setup watching for network resources, // to support network throttling.
onNetworkResourceAvailable() {}
/** * Reload the current tab.
*/
async reloadBrowser() {
await this.commands.targetCommand.reloadTopLevelTarget();
}
}
module.exports = ResponsiveUI;
¤ Dauer der Verarbeitung: 0.18 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.