I need to analyze the object created by Angular in the blur event.(我需要在模糊事件中分析Angular创建的对象。)
I've logged it in the console but the object is rather big and it's hard to follow, as the properties aren't directly visible and I have to click each one to know the contents.(我已将其记录在控制台中,但该对象相当大且很难遵循,因为这些属性不是直接可见的,因此我必须单击每个对象才能知道其内容。)
FocusEvent {isTrusted: true, relatedTarget: null, view: Window, detail: 0, sourceCapabilities: InputDeviceCapabilities, …}
bubbles: false
cancelBubble: false
cancelable: false
composed: true
currentTarget: null
defaultPrevented: false
detail: 0
eventPhase: 0
isTrusted: true
path: (14) [input.table-cell, td, tr, tbody.ui-table-tbody, table, div.ui-table-wrapper, div.ui-table.ui-widget, p-table, app-table-test, app-root, body, html, document, Window]
relatedTarget: null
returnValue: true
sourceCapabilities: InputDeviceCapabilities {firesTouchEvents: false}
srcElement: input.table-cell
target: input.table-cell
timeStamp: 6538.540000008652
type: "blur"
view: Window {parent: Window, postMessage: ?, blur: ?, focus: ?, close: ?, …}
which: 0
__proto__: FocusEvent
To this end, I've used JSON.stringify
to turn it into a string that I can copy into the clipboard (and then a text editor), but its only output is an object with just one property , namely, it shows {isTrusted: true}
.(为此,我使用JSON.stringify
将其转换为可以复制到剪贴板(然后是文本编辑器)的字符串,但是它的唯一输出是仅具有一个属性的对象 ,即,它显示{isTrusted: true}
。)
That's it.(而已。)
I've read that stringify only shows own properties, and I wonder if there is a way I can make it print everything.(我读过stringify只显示自己的属性,不知道是否有一种方法可以使它打印所有内容。)
ask by JD Gamboa translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…