overleaf/services/web/public/coffee/app/directives/stopPropagation.coffee

14 lines
294 B
CoffeeScript
Raw Normal View History

define [
"base"
], (App) ->
App.directive "stopPropagation", ($http) ->
console.log "Registering"
return {
restrict: "A",
link: (scope, element, attrs) ->
console.log "linking"
element.bind attrs.stopPropagation, (e) ->
console.log "click"
e.stopPropagation()
}