 #
 # Attributes:
 #   data-pwnfx-remove: an identifier connecting the elements to be removed
-#   data-pwnfx-remove-target: set to the same value as data-pwnfx-remove on
-#       elements that will be removed when the element is clicked
+#   data-pwnfx-remove-target: a space-separated list of identifiers, one of which
+#       should match the value of data-pwnfx-remove; set on elements that will
+#       be removed when the element is clicked
 class PwnFxRemove
   constructor: (element, identifier, scopeId) ->
-    targetSelector = "[data-pwnfx-remove-target=\"#{identifier}\"]"
+    targetSelector = "[data-pwnfx-remove-target~=\"#{identifier}\"]"
 
     onClick = (event) ->
       scope = PwnFx.resolveScope scopeId, element

  constructor: (element, identifier, scopeId) ->
    scope = PwnFx.resolveScope scopeId, element
    method = element.getAttribute('data-pwnfx-move-method') || 'append'
    target = document.querySelector "[data-pwnfx-move-target=\"#{identifier}\"]"

    switch method
      when 'append'

#
# Attributes:
#   data-pwnfx-move: an identifier connecting the move's target element
#   data-pwnfx-move-target: a space-separated list of identifiers, one of which
#       should match the value of data-pwnfx-move; set on the element that will
#       receive the moved element as its last child
#   data-pwnfx-move-method: 'append' adds the moved as the element as the
#       target's last child, 'replace' clears the target element, then adds the
#       moved element as the target's only child
