"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "packages/common/src/common/Emitter.ts" between
fullcalendar-5.9.0.tar.gz and fullcalendar-5.10.0.tar.gz

About: FullCalendar is a full-sized drag & drop JavaScript event calendar.

Emitter.ts  (fullcalendar-5.9.0):Emitter.ts  (fullcalendar-5.10.0)
skipping to change at line 38 skipping to change at line 38
trigger<Prop extends keyof HandlerFuncs>(type: Prop, ...args: Parameters<Handl erFuncs[Prop]>) { trigger<Prop extends keyof HandlerFuncs>(type: Prop, ...args: Parameters<Handl erFuncs[Prop]>) {
let attachedHandlers = this.handlers[type] || [] let attachedHandlers = this.handlers[type] || []
let optionHandler = this.options && this.options[type] let optionHandler = this.options && this.options[type]
let handlers = [].concat(optionHandler || [], attachedHandlers) let handlers = [].concat(optionHandler || [], attachedHandlers)
for (let handler of handlers) { for (let handler of handlers) {
handler.apply(this.thisContext, args) handler.apply(this.thisContext, args)
} }
} }
hasHandlers(type: keyof HandlerFuncs) { hasHandlers(type: keyof HandlerFuncs): boolean {
return (this.handlers[type] && this.handlers[type].length) || return Boolean(
(this.options && this.options[type]) (this.handlers[type] && this.handlers[type].length) ||
(this.options && this.options[type]),
)
} }
} }
function addToHash(hash, type, handler) { function addToHash(hash, type, handler) {
(hash[type] || (hash[type] = [])) (hash[type] || (hash[type] = []))
.push(handler) .push(handler)
} }
function removeFromHash(hash, type, handler?) { function removeFromHash(hash, type, handler?) {
if (handler) { if (handler) {
 End of changes. 1 change blocks. 
3 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)