/* 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/. */
// If a device is currently selected, fold its attributes into a single object for use // as the starting values of the form. If no device is selected, use the values for // the current window.
let deviceName; const normalizedViewport = Object.assign({}, viewportTemplate); if (viewportTemplate.device) { const device = devices[viewportTemplate.deviceType].find(d => { return d.name == viewportTemplate.device;
});
deviceName = getFormatStr( "responsive.customDeviceNameFromBase",
device.name
);
Object.assign(normalizedViewport, {
pixelRatio: device.pixelRatio,
userAgent: device.userAgent,
touch: device.touch,
});
} else {
deviceName = getStr("responsive.customDeviceName");
Object.assign(normalizedViewport, {
pixelRatio: window.devicePixelRatio,
userAgent: navigator.userAgent,
touch: false,
});
}
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.