code: function(delSession){
  		var onmessage = null;
  		var onstatechange = null;
  		var self = this;
  		delSession.onstatechange = function(){
  			if (typeof onstatechange == 'function') {
  				onstatechange.call(null);
  			};
  		};
  		delSession.onmessage = function(msg){
  			if (typeof onmessage == 'function') {
  				onmessage.call(null,msg);
  			};
  		};
  		Object.defineProperty(this, 'state', {
  			get: function () {
  				return (delSession && delSession.state) || null;
  			}
  		});
  		Object.defineProperty(this, 'onmessage', {
  			get: function () {
  				return onmessage;
  			},
  			set: function(value){
  				if (typeof value == 'function' || value == null) {
  					onmessage = value;
  				};
  			}
  		});
  		Object.defineProperty(this, 'onstatechange', {
  			get: function () {
  				return onstatechange;
  			},
  			set: function(value){
  				if (typeof value == 'function' || value == null) {
  					onstatechange = value;
  				};
  			}
  		});
  
  		Object.defineProperty(this, 'postMessage', {
  			get: function () {
  				return function(msg){
  					return delSession.postMessage(msg);
  				};
  			}
  		});
  
  		Object.defineProperty(this, 'close', {
  			get: function () {
  				return function(){
  					return delSession.close();
  				};
  			}
  		});
  	}
docs: /*
  PresentationSession: for details please refer to http://www.w3.org/2014/secondscreen/presentation-api/20140721/#presentationsession