GF_DOMEventTarget *gf_dom_event_target_new(GF_DOMEventTargetType type, void *obj)
{
	GF_DOMEventTarget *target;
	GF_SAFEALLOC(target, GF_DOMEventTarget);
	if (!target) return NULL;
	target->ptr_type = type;
	target->listeners = gf_list_new();
	target->ptr = obj;
	return target;
}
GF_DOMEventTarget *gf_dom_event_target_new(GF_DOMEventTargetType type, void *obj)
{
	GF_DOMEventTarget *target;
	GF_SAFEALLOC(target, GF_DOMEventTarget);
	if (!target) return NULL;
	target->ptr_type = type;
	target->listeners = gf_list_new();
	target->ptr = obj;
	return target;
}