eventsource icon indicating copy to clipboard operation
eventsource copied to clipboard

Event.target is undefined when the EventListener dispatched.

Open uni-is-0kcal opened this issue 4 years ago • 1 comments

hi

I want to refer to the object to which the event is dispatched. However, when I access the Target property of the event, it is undefined. What should I do?

ref: https://developer.mozilla.org/ja/docs/Web/API/Event/target

uni-is-0kcal avatar Mar 12 '21 06:03 uni-is-0kcal

node.js is used as a client. Since I will be communicating with multiple directories on the same server, I will add a property to the EventSource object for directory identification. Therefore, I need a reference to the target. URL information alone is fine for determining the directory, but the parameter "origin" in the event object contains only the host name and port number and cannot determine the directory.

uni-is-0kcal avatar Mar 12 '21 07:03 uni-is-0kcal