when 'DOMRadio'
	if @isMultiChoice # The newValue var will hold the radio field binding as its value if the update is coming from the radio field's change event
		targetChoiceBinding = if checkIf.isBinding(newValue) then newValue else @choices[newValue]

		if targetChoiceBinding
			newValue = targetChoiceBinding.object.value
		
			for n,choiceBinding of @choices
				choiceBinding.setValue(choiceBinding.ID is targetChoiceBinding.ID, publisher)
		else
			newValue = @value # Set to prev value
	
	else
		newValue = !!newValue # Convert to Boolean
		return if newValue is @value
		@object.checked = newValue unless @object.checked is newValue
		@object.dispatchEvent(changeEvent()) if newValue and settings.dispatchEvents # Only emit if the value is true (in order to conform to web standards)


when 'DOMCheckbox'
	if @isMultiChoice # The newValue var will hold the checkbox field binding as its value if the update is coming from the checkbox field's change event
		overwritePrevious = not checkIf.isBinding(newValue) # Means that a new array was supplied
		newChoices = [].concat(newValue) # This *normalizes* the new value into an array
		
		for value,index in newChoices
			newChoices[index] = if checkIf.isBinding(value) then value else @choices[value]
		
		newValueArray = []
		for choiceName,choiceBinding of @choices
			if overwritePrevious
				newChoiceValue = targetIncludes(newChoices, choiceBinding)
			else
				newChoiceValue = choiceBinding.value
			
			choiceBinding.setValue(newChoiceValue, publisher)
			newValueArray.push(choiceName) if newChoiceValue

		newValue = newValueArray


	else
		newValue = !!newValue # Convert to Boolean
		return if newValue is @value
		unless @object.checked is newValue
			@object.checked = newValue
			@object.dispatchEvent(changeEvent()) if settings.dispatchEvents



when 'DOMAttr'
	@object.setAttribute(@property, newValue)
