I want to write a custom event and print to console obj.name in its callback function
But I get an error and need to get obj name as obj.detail.context.name
How can I solve it and print using obj.name line code instead of obj.detail.context.name
currently the strucure of obj in the callback is:
obj
CustomEvent { isTrusted: false } bubbles: false cancelBubble: false cancelable: false currentTarget: WindowdefaultPrevented: false detail: Object eventPhase: 2isTrusted: falseisTrusted: falsepath: Array[1]returnValue: truesrcElement: Windowtarget: WindowtimeStamp: 1446215160435type: "eat:done"proto: CustomEvent