 
 now = () -> new Date().getTime()
 
+_bindEvent = (event, fn) ->
+
+	@listeners = @listeners or {}
+	@listeners[event] = @listeners[event] or []
+	@listeners[event].push(fn);
+
+	# @node.addEventListener(event, fn , no)
+
+_fireEvent = (event) ->
+
+	return fn.call(@) for fn in @listeners[event] when @listeners[event] and isFunction(fn) if @listeners
+
 # 创建弹框节点
 createNode = ()->
 	div = CE('div')


		# 执行回调显示前回调
		@config['onShow'].call(@) if isFunction(@config['onShow'])

		# 按钮绑定事件
		@node.querySelector('.btn-ok').addEventListener('click',()->
			self.config['ok'].call(self) if isFunction(self.config['ok'])
		,false) if @node.querySelector('.btn-ok')

		@node.querySelector('.btn-cancel').addEventListener('click',()->
			k = self.config['cancel'].call(self) if isFunction(self.config['cancel'])
			if k is false
				return k
			else if self

		@id = 'tan' + now()
		@isOperating = false

	version:'0.1.0'

	# 原型显示方法
	# 参数类型:boolean
