   null
 
 # Honor data-pwnfx attributes after the DOM is loaded.
-window.addEventListener 'load', -> window.PwnFx()
+window.addEventListener 'load', -> window.PwnFx(document)

    targetSelector = 
    target = document.querySelector "[data-pwnfx-move-target=\"#{identifier}\"]"
    target.appendChild element

# Shows / hides elements when an element is clicked or checked / unchecked.
#

# List of effects.
pwnEffects = [
  ['data-pwnfx-move', PwnFxMove],
  ['data-pwnfx-render', PwnFxRender],
  ['data-pwnfx-refresh-url', PwnFxRefresh],
  ['data-pwnfx-confirm', PwnFxConfirm],
  ['data-pwnfx-reveal', PwnFxReveal]
]

# Wires JS to elements with data-pwnfx attributes.
#
# @param [DOMElement] root the element whose content is wired; use document at
#                          load time
window.PwnFx = (root) ->
  for effect in pwnEffects
    attrName = effect[0]
    effectClass = effect[1]
