MCPcopy Create free account
hub / github.com/breck7/scroll / eventMixin

Function eventMixin

external/.scrollLibs.js:2014–2021  ·  view source on GitHub ↗
(ctor)

Source from the content-addressed store, hash-verified

2012 // Add on and off methods to a constructor's prototype, to make
2013 // registering events on such objects more convenient.
2014 function eventMixin(ctor) {
2015 ctor.prototype.on = function (type, f) {
2016 on(this, type, f)
2017 }
2018 ctor.prototype.off = function (type, f) {
2019 off(this, type, f)
2020 }
2021 }
2022
2023 // Due to the fact that we still support jurassic IE versions, some
2024 // compatibility wrappers are needed.

Callers 2

.scrollLibs.jsFile · 0.85
addEditorMethodsFunction · 0.85

Calls 2

offFunction · 0.85
onFunction · 0.70

Tested by

no test coverage detected