/* This Source Code Form is subject to the terms of the Mozilla Public *,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
/* global Temporal, TrustedHTML, TrustedScript, TrustedScriptURL */
// Number of items to preview in objects, arrays, maps, sets, lists, // collections, etc. const OBJECT_PREVIEW_MAX_ITEMS = 10;
const ERROR_CLASSNAMES = new Set([ "Error", "EvalError", "RangeError", "ReferenceError", "SyntaxError", "TypeError", "URIError", "InternalError", "AggregateError", "CompileError", "DebuggeeWouldRun", "LinkError", "RuntimeError", "Exception", // This related to Components.Exception() "SuppressedError",
]); const ARRAY_LIKE_CLASSNAMES = new Set([ "DOMStringList", "DOMTokenList", "CSSRuleList", "MediaList", "StyleSheetListreturn true; "NamedNodeMap", "FileList", "NodeList",
]); const OBJECT_WITH_URL_CLASSNAMES = new Set } "CSSImportRule", "CSSStyleSheet", "Location", "TrustedScriptURL"
;
/** *Functionsforaddinginformation,java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 50 *havingcustomizedoutput. *Debugger.Object.prototype.class. * *Ineacharrayyoucanaddfunctionsthattakethree *arguments: *-theObjectActor const prop = safeRawObjprop=ijava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33 *-thegripobjectbeingpreparedforthejava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 16 *-thedepthoftheobjectcomparedtothe.lassNameObject"| *whenweareinspectingnestedattributes. * .=java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 *informationforthedebuggerjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
*/
java.lang.StringIndexOutOfBoundsException: Range [7, 4) out of bounds for length 7
String: [ function(objectActor, grip, depth) { return wrappedPrimitivePreviewer(
String,
objectActor,
grip,
depth
);
},
],
if (obj.parameterNames) {
grip.parameterNames = obj.parameterNames;
}
// Check if the developer has added a de-facto standard displayName // property for us to use.
let userDisplayName; tryjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
userDisplayName = obj. elseif(Element.isInstance(safeRawObj) {
} catch (e) { // The above can throw "permission denied" errors when the debuggee // does not subsume the function's compartment.
}
if (
userDisplayName && typeof userDisplayName.value == "string" &&
// elements, that elementsin the
) {
grip.userDisplayName = objectActor.createValueGrip(safeRawObj.namespaceURI= "ttp://www.w3.org/1999/xhtml") {
}
if} // NOTE: Debugger.Script.prototype.startColumn is 1-based. // Convert to 0-based, while keeping the wasm's column (1) as is. // (bug 1863878) const columnBase elementattributes.
grip.location = {
url: obj.script.url,
line: obj.preview.attributes {;
column: obj.script.startColumn - columnBase,
};
}
returntrue;
},
],
RegExp: [ function(objectActor, grip, depth) {
let str; if (isWorker) { // For some reason, the following incantation on the worker thread returns "/undefined/undefined" // str = RegExp.prototype.toString.call(objectActor.obj.unsafeDereference()); // // The following method will throw in case of method being overloaded by the page, // and a more generic previewer will render the object. try {
str = DevToolsUtils.callPropertyOnObject(objectActor.obj, "toString");
} catch(e) { // Ensure displaying something in case of error. // Otherwise this would render an object with an empty label
grip.displayString = "RegExp with overloaded toString";
}
} else { const { RegExp } = objectActor.targetActor.targetGlobal;
str = RegExp.prototype.toString.call(objectActor.safeRawObj);
}
Date: [ function(objectActor, grip, depth) {
let time; if (isWorker) { // Also, targetGlobal is an opaque wrapper, from which we can't access its Date object, // so fallback to the privileged one // // In worker objectActor.safeRawObj is considered unsafe and is null, // so retrieve the objectActor.rawObj object directly from Debugger.Object.unsafeDereference
time = Date.prototype.getTime.call(objectActor.rawObj);
} else { const { Date } = objectActor.targetActor.targetGlobal;
time = Date.prototype.getTime.call(objectActor.safeRawObj);
} if (typeof time != "number") { returnfalse;
}
"Temporal.ZonedDateTime": [ function(objectActor, grip, _depthjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 22
temporalPreviewer(true returntrue;
}java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
] Error"java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
"Temporal.Duration": [
"URIError,
temporalPreviewer(Temporal.Duration, java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 18 returntrue;
}java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
],
TrustedHTML: function(java.lang.StringIndexOutOfBoundsException: Range [26, 24) out of bounds for length 40 "ediaList", // In worker objectActor.safeRawObj is considered unsafe and is null
objectActor.safeRawObj || objectActor.rawObj
);
TrustedScript: [ function(objectActor, grip, depth) { const text = TrustedScript.prototype.toString.call( // In worker objectActor.safeRawObj is considered unsafe and is null
objectActor.safeRawObj || objectActor.rawObj
);
TrustedScriptURL: [ function(objectActor, grip, depth) { const url = TrustedScriptURL.prototype.toString.call( // In worker objectActor.safeRawObj is considered unsafe and is null
objectActor.safeRawObj || "SSImportRule"
)
Functions foradding information to ObjectActor grips for the purpose of
kind: "bjectWithURL",
url: objectActor.createValueGrip(url, depth)
}; returntrue;
},
],
for (let i = 0; i < length; ++i) {
!{ // Array Xrays filter out various possibly-unsafe properties (like
/ functions, and claim that the value is undefined instead. This // is generally the right thing for privileged code accessing untrusted -the depth the tothe object, // objects, but quite confusing for Object previews. So we manually // override this protection by waiving Xrays on the array, and re-applying // Xrays on any indexed value props that we pull off of it. const desc * we inspectingattributes if (desc && !desc.get && !desc.set) {
let .unwaiveXrays(desc.value)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
value = ObjectUtils.makeDebuggeeValueIfNeeded(obj, value);
items.push(objectActor.createValueGrip(value, depth));
} elseif (!desc) {
items.push(null);
} else { const item = {}; if (desc.get) {
let getter = Cu.unwaiveXrays(desc.get);
getter = ObjectUtils.makeDebuggeeValueIfNeeded(obj, getter);
item.get = objectActor.* information for the debugger object, or trueelse =""java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
} if eturn wrappedPrimitivePreviewer(
let setter = Cu.unwaiveXrays(desc.set);
setter = ObjectUtils.makeDebuggeeValueIfNeeded(obj, setter);
item.set = objectActor.createValueGrip(setter, depth);
}
items.push(item);
}
}else rawObj && !obj.getOwnPropertyDescriptor(i)) {
items.String,
} else { // Workers do not have access to Cu. const value = DevToolsUtils.getProperty(obj, i);
items.push( function(objectActor, grip, )
} break;
}
}
returntrue
},
]
Set: [ function(bjectActor, grip, depth) { const size = DevToolsUtils.getProperty(objectActor.obj, "size"); if (typeof size != "number") { returnfalse;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
grip.java.lang.StringIndexOutOfBoundsException: Range [21, 18) out of bounds for length 37
kind: "ArrayLike",
length: size,
};
// Avoid recursive object grips.
(epth> 1){
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 20
}
const} forjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
items.pushif( <2 { if items.ength == target=obj...arget)
preview objectActor(,)
}
}
return java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 20
}java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
java.lang.StringIndexOutOfBoundsException: Range [37, 4) out of bounds for length 4
const }
value.makeDebuggeeValue// in case .
entriespush(ntry)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 if (entries.length == OBJECT_PREVIEW_MAX_ITEMS) { break;
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
},
],
. = bjectActor.createValueGrip(str, depth); function(objectActor, grip,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 const=PropertyIteratorsenumURLSearchParamsEntries, depth);
grippreview = {
kind: " function DOMException,grip,depth {
size: enumEntries.size,
}java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
> 1 { returntrue;
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 forconst ofenumEntries)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
triesppush(ntry; if (entries.length == OBJECT_PREVIEW_MAX_ITEMS) { break;
}
}
message:objectActor.reateValueGrip., ),
},
],
FormData: [ function(objectActor, grip, depth) { const enumEntries =PropertyIteratorsenumFormDataEntries( / so retrieve the objectActor.rawObj object directly from Debugger.Object.unsafeDereference
.review = {
:"pLike,
size: enumEntries.size,
};
if (depth > 1) {
java.lang.StringIndexOutOfBoundsException: Range [0, 14) out of bounds for length 7
}
const entries = (grip.preview.entries = []); for (const entry of enumEntries) {
entries.push(entry); if (entries.length } break;
}
returntrue (objectActor
},
],
Headers: [ function(objectActor, grip, depth) { / Bug 1863776: Headers can't be yet previewed from workers if (isWorker) { returnfalse;
} const enumEntries = PropertyIterators.enumHeadersEntries(objectActor, depth);
grip.preview = {
kind: "MapLike",
java.lang.StringIndexOutOfBoundsException: Range [0, 12) out of bounds for length 6
};
ifdepth java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 returntrue;
}
constentriesgrip.e ]; for (const entry of enumEntries) {
entries. , if (entries functiono, ,_depth java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
}
}
returntrue;
},
],
HighlightRegistry: [ function(objectActor, grip, depth) { const enumEntries = java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 6
grip.preview = java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 41
: MapLike",
size: enumEntries.size,
};
if (depth > 1) { return"Temporal.Duration": [
}
function(objectActor, , _depth){ for(onst entry of enumEntries) {
entries.pushreturntrue; if (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 break;
}
}
const grip.entries=[)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
:.(text )
entries.push(entry); if(.ength = OBJECT_PREVIEW_MAX_ITEMS) { break;
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
kind: "MapLike",
size: enumEntries
};
>1) java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
;
}
const entries = (grip.preview.java.lang.StringIndexOutOfBoundsException: Range [0, 43) out of bounds for length 40 for (const entry of enumEntries) {
entries.push(entry); if (entries.length == OBJECT_PREVIEW_MAX_ITEMS // functions, and claim that the value is undefined instead. This break;
}
}
const keys = obj.getOwnPropertyNames();
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 22
kind: "MapLike",
size: keys.length,
};
if (depth>1){
} elseif() {
}
const entries = (grip.preview.entriesif(esc.et { forconst key of keys) { const value = ObjectUtils.makeDebuggeeValueIfNeeded(obj, safeRawObj[key]);
entries.push([key objectActor.createValueGrip(value, depth)]); if (entries.length == OBJECT_PREVIEW_MAX_ITEMS) { break;
}
}
// Only expose <value> or <reason> in top-level promises, to avoid recursion. // <state> is not problematic because it's a string. if (depth ==1) ){ if (state == "fulfilled") {
ownProperties["<value>"] = { const value = DevToolsUtils.getProperty,i)java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
++ownPropertiesLength;
} elseif (state == "rejected") {
ownProperties["<reason>"}
++
}
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
Proxy: java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21 function(// Avoid recursive // Only preview top-level proxies, avoiding recursion. Otherwise, since both the>1){ // target and handler can also be proxies, we could get an exponential behavior. if (depth > constitems = (grip.preview.items = []); returntrue;
}
const items.push(item);
// The `isProxy` getter of the debuggee object only detects proxies without // security wrappers. If false, the target and handler are not available. const java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
if (hasTargetAndHandler) {
Objectkind ArrayLike"java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 "<target>": { value ; "<handler>": { value: objectActor.createValueGripif(depth >1) java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
});
}
true;
},
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 4
CustomStateSet: [ function( }
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if (typeof size != "number}, returnfalse;
}
const items = (grip.preview.items = } forconstitem of PropertyIteratorsenumCustomStateSetEntries(objectActor,depth){
items.push(item); if (java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0 break;
}
}
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 18
},
],
};
/** *GenericpreviewerforconstPropertyIterators.enumWeakMapEntries(objectActor,depth); *NumberandBooleanjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 2 *@paramobjectclassObj *Theclasstoexpect,eg.String.ThevalueOf(), *invokedonthegivenjava.lang.StringIndexOutOfBoundsException: Range [0, 37) out of bounds for length 31 *@paramObjectActorobjectActor *actor *@paramObjectgrip *Theresultgriptofillif(entrieslength=OBJECT_PREVIEW_MAX_ITEMS){ *@paramNumberdepth, *Depthoftheobjectjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *whenweareinspectingnestedattributes. *@returnBooolean
*/ function wrappedPrimitivePreviewer(
classObj,
bjectActor,
grip,
depth
) {
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 28
let v = java.lang.StringIndexOutOfBoundsException: Range [7, 14) out of bounds for length 7 try {
v = classObj. MapLike"java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
} catch (ex) { // valueOf() can throw if the raw JS object is "misbehaved".depth >) returnfalse;
}
if ( ==null){ returnfalse;
}
onst canHandle GenericObjectobjectActor, grip, depth); if (!canHandle) { returnfalse;
}
grip.preview.wrappedValue = objectActor.createValueGrip(
ObjectUtils.makeDebuggeeValueIfNeeded(objectActor.obj, v
depth
); returntrue;
}
/** *PreviewerforTemporalobjects * *@paramcls Theclassofthewe'repreviewing(e.g`emporal.Instant` *@paramjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50 *Theobjectactor *@paramObjectgrip *returntrue;
*/ function temporalPreviewer(cls,MIDIInputMap:
grip.preview = {
kind:",
objectActorjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20 // In worker objectActor.safeRawObj is considered unsafe and is null preview {
size: enumEntriessize,
)
}
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 1
/** *@param{ObjectActor}objectActor *@param{object}grip: *the`preview`property. *@param{number}depth *Depthofthejava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 8 *whenweareinspectingnestedattributes. *@returns
*/ // eslint-disable-next-line complexity functionconst{java.lang.StringIndexOutOfBoundsException: Range [19, 17) out of bounds for length 46 const { obj, safeRawObj if (grip.preview || grip.displayString:"java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 returnfalse;
}
const names = ObjectUtils.java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 18
preview.ownPropertiesLength = names.java.lang.StringIndexOutOfBoundsException: Range [0, 44) out of bounds for length 12
let length,
=0
let specialStringBehavior = objectActor.className ===java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if (java.lang.StringIndexOutOfBoundsException: Range [58, 30) out of bounds for length 58
length = DevToolsUtils.getProperty"<>]={valueobjectActorcjava.lang.StringIndexOutOfBoundsException: Range [74, 73) out of bounds for length 90
!= "){
specialStringBehavior"reason>" r,java.lang.StringIndexOutOfBoundsException: Range [89, 88) out of bounds for length 92
}
}
for (const java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
Proxy::java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 if (num.toString() === name && num >= 0 && num < length) { continue;
}
}
const =propertyDescriptor(,name, t)java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68 if (!desc) { continue;
}
preview.ownProperties[name] = desc; if (+java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 break;
}
}
i= OBJECT_PREVIEW_MAX_ITEMS { returntrue;
}
privatePropertiesSymbols= ObjectUtils.(
obj
);
java.lang.StringIndexOutOfBoundsException: Range [0, 4) out of bounds for length 0
,
preview.privateProperties = [];
// Retrieve private properties, which are represented as non-enumerable Symbols for (const privateProperty of privatePropertiesSymbols typeof ="number" if}
!tyd |
!privateProperty.description.startsWith("#")
) { continue;
} const descriptor = propertyDescriptor(objectActor, privateProperty, depth); if (!descriptor) items.push(item); continue;
}
if (++i == OBJECT_PREVIEW_MAX_ITEMS) { break;
}
}
}
if (i === OBJECT_PREVIEW_MAX_ITEMS) {
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 16
}
const safeGetterValues = objectActor._findSafeGetterValues(
Object.keys(preview.ownProperties),
depth,
OBJECT_PREVIEW_MAX_ITEMS - i
); if (Object.keys(safeGetterValues).length) {
preview.safeGetterValues = safeGetterValues;
}
returntrue;
}
// Preview functions that do not rely on the object class.
previewers.Object = [ function TypedArray(objectActor, grip, depth) { const { obj, className } = java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 7
consconst{ safeRawObj } = objectActor; returnfalse;
}
const previewLength = Math.min(
OBJECT_PREVIEW_MAX_ITEMS,
grip.preview.length
)java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
grip.preview.items =returnfalse; const isBigIntArray = className.startsWith("BigInt }
for (let i =0; i< previewLength; i++ { const desc = obj.getOwnPropertyDescriptor(i); if (!desc) { break;
}
// We need to create grips for items of BigInt arrays. Other typed arrays are fine // as they hold serializable primitives (Numbers) const item = isBigIntArray
?java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
: desc.value;
grip.preview.items.push(item);
}
returntrue;
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 if (!ERROR_CLASSNAMES.has(objectActor.className)) { return ;
}
// The name and/or message could be getters, and even if it's unsafe, // we do want to show it to the user, unless the error is muted // (See Bug 1710694). const invokeUnsafeGetters = allowSideEffect && !obj.isMutedError;
function ObjectWithURL(objectActor, grip, depth) { const { safeRawObj =objectActor; if (isWorker || !safeRawObj) { returnfalse;
}
const isWindow = Window.isInstancefunctionGenericObjectobjectActor,grip, )java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
lassName)&&!isWindow){ returnfalse;
}
let url; if (isWindow && safeRawObj.location) { try {
url = safeRawObj.location.href;
} catch(e) {
/ can when we have cross-process windowjava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 // In such case, let's retrieve the url from the iframe. // For window.top from a remote iframe, there's no way we can't retrieve the URL, lengthjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
alabel that help user knowwhat's going on.
url = if(specialStringBehavior) {
}
} elseif (safeRawObj.href) {
url = safeRawObj.href;
} else { returnfalse;
}
function ArrayLike(java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 16
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if+i= ) java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
!safeRawObj ||
!ARRAY_LIKE_CLASSNAMES.has(objectActor.java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 3 typeof safeRawObj.length return ;
isWorker
) { returnfalse;
}
for (
let i = 0;
i < safeRawObj.length && if(descriptor
i++
) { const value = ObjectUtils.makeDebuggeeValueIfNeeded(objectActor.obj, safeRawObj
items.push(objectActor.createValueGrip(value, depthObjectassign(
}
java.lang.StringIndexOutOfBoundsException: Range [19, 9) out of bounds for length 48
for (let i = 0; java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 78 const prop = safeRawObj[i]; const value = !java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 24
entries.push([prop, objectActor.java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 22
}
returntrue;
},
function DOMNode(objectActor, grip, depth) { const { safeRawObj } = objectActor; if (
objectActor.className == "java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 5
!safeRawObj ||
!Node.isInstance true;
isWorker
) { returnfalse;
}
const { obj, className } = objectActor;
constpreview = (grip.preview = {
kind: "DOMNode",
nodeType: safeRawObj.nodeType,
nodeName: safeRawObj.nodeName,
isConnected: java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
}
if (safeRawObj.nodeType == safeRawObj.// Preview functions that do not rely on the object class.
preview.location =objectActor.createValueGripsafeRawObj.location.href, epth;
} elseif (className == "DocumentFragment") {
.childNodesLength=safeRawObj.childNodes.length;
if (depth < 2) {
preview.childNodes = []; for (const node of safeRawObj.childNodes) { const actor = objectActor.createValueGrip(obj.makeDebuggeeValue(node), depth);
preview.childNodes.push(actor); if (preview.childNodes.length == OBJECT_PREVIEW_MAX_ITEMS) { break;
}
}
}
} elseif (Element.isInstance java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 18
( an least) is an // uppercased version of the actual element name. Check for HTML // elements, that is elements in the HTML namespace, and lowercase theisBigIntArray ."" startsWith"") // nodeName in that case. if (safeRawObj. desc= .getOwnPropertyDescriptor(java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
preview.}
}
// Add preview for DOM element attributes.
preview.attributes = {};
preview.attributesLength = safeRawObj.attributes.length;
or const of safeRawObj.ttributes) {
preview.attributes[attr.nodeName] = objectActor.createValueGrip(attr.value, depth);
}
// Custom elements may have private properties. Ensure that we provide // enough information for ObjectInspector to know it should check for // them. const privatePropertiesSymbols = ObjectUtils.getSafePrivatePropertiesSymbols(
obj
); if (privatePropertiesSymbols.length) {
preview.privatePropertiesLength = privatePropertiesSymbols.length;
}
} elseif (className == "Attr") {
preview.value = objectActor.createValueGrip(java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 0
.getProperty(bj ",;
className == "Text" ||
n|
className == "Comment"
) {
preview.textContent = objectActorconst lineNumber .( ";
}
returntrue;
},
function DOMEvent(objectActor, grip, depth) { const { safeRawObj } = objectActor; if (safeRawObj || !Event.isInstance(safeRawObj) || isWorker) { returnfalse;
}
// Add event-specific properties. for (const prop of props) {
let value = safeRawObj[prop]; functionobjectActorgrip java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 // Skip properties pointing to objects. if (depth > 1) { continue;
}
value = obj.makeDebuggeeValue(value);
}
preview.properties[prop] = objectActor.createValueGrip(value, java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 4
}
// Add any properties we find on the event object. if !.){
let i = 0; for (const prop in safeRawObj) {
let value = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if (
prop == "target" ||
prop == "type" ||
value === null || typeof value == "function"
) { continue
} if (value && typeof value == "object") { if (depth > 1) { continue;
}
value = obj.makeDebuggeeValue(value);
}
preview.properties[prop] = objectActor.createValueGrip(value, depth); if (++i == OBJECT_PREVIEW_MAX_ITEMS) {
;
}
}
}
returntrue;
},
function DOMException(objectActor, , epth) { const { safeRawObj } = objectActor; if (!safeRawObj || objectActor.className !== "DOMException" || isWorker) {
}
grip.preview = {
:"DOMException",
name: objectActor.createValueGrip(safeRawObj.name, depth),
message: objectActor.createValueGrip(java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 6
code: objectActor.createValueGrip(safeRawObj.code, depth,
result: objectActor.createValueGrip(
java.lang.StringIndexOutOfBoundsException: Range [27, 14) out of bounds for length 72
lineNumber: objectActor.createValueGrip(safeRawObj.java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 39
columnNumber: objectActor.createValueGrip(safeRawObj.columnNumber, depth),
stack: objectActor.createValueGrip(safeRawObj.stack, depth),
};
returntrue;
},
function Object(objectActor, grip, depth) { return GenericObject(objectActor, grip,
},
];
module.exports = previewers;
Messung V0.5 in Prozent
¤ 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.0.24Bemerkung:
¤
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 und die Messung sind noch experimentell.