nl_tokens: Define a custom EventTarget with event attributes .
pl_tokens: function defineCustomEventTarget ( eventNames ) { /** CustomEventTarget */ function CustomEventTarget ( ) { EventTarget . call ( this ) ; } CustomEventTarget . prototype = Object . <mask> ( EventTarget . prototype , { constructor : { value : CustomEventTarget , configurable : true , writable : true , } , } ) ; for ( let i = 0 ; i < eventNames . length ; ++ i ) { defineEventAttribute ( CustomEventTarget . prototype , eventNames [ i ] ) ; } return CustomEventTarget }