dist/styleguide/js/patternlab-viewer.js
function (e) {

		var patternName;
		var state = e.state;

		if (state === null) {
			this.skipBack = false;
			return;
		} else if (state !== null) {
			patternName = state.pattern;
		}

		var iFramePath = "";
		iFramePath = this.getFileName(patternName);
		if (iFramePath === "") {
			iFramePath = "styleguide/html/styleguide.html";
		}

		var obj = JSON.stringify({
			"event": "patternLab.updatePath",
			"path": iFramePath
		});
		document.querySelector('.pl-js-iframe').contentWindow.postMessage(obj, urlHandler.targetOrigin);
		document.getElementById("title").innerHTML = "Pattern Lab - " + patternName;
		document.querySelector('.pl-js-open-new-window').setAttribute("href", urlHandler.getFileName(patternName));
	}
function (e) {

		var patternName;
		var state = e.state;

		if (state === null) {
			this.skipBack = false;
			return;
		} else if (state !== null) {
			patternName = state.pattern;
		}

		var iFramePath = "";
		iFramePath = this.getFileName(patternName);
		if (iFramePath === "") {
			iFramePath = "styleguide/html/styleguide.html";
		}

		var obj = JSON.stringify({
			"event": "patternLab.updatePath",
			"path": iFramePath
		});
		document.querySelector('.pl-js-iframe').contentWindow.postMessage(obj, urlHandler.targetOrigin);
		document.getElementById("title").innerHTML = "Pattern Lab - " + patternName;
		document.querySelector('.pl-js-open-new-window').setAttribute("href", urlHandler.getFileName(patternName));
	}
function ( e ) { var patternName ; var state = e . state ; if ( state === null ) { this . skipBack = false ; return ; } else if ( state !== null ) { patternName = state . pattern ; } var iFramePath = "" ; iFramePath = this . getFileName ( patternName ) ; if ( iFramePath === "" ) { iFramePath = "styleguide/html/styleguide.html" ; } var obj = JSON . stringify ( { "event" : "patternLab.updatePath" , "path" : iFramePath } ) ; document . querySelector ( '.pl-js-iframe' ) . contentWindow . postMessage ( obj , urlHandler . targetOrigin ) ; document . getElementById ( "title" ) . innerHTML = "Pattern Lab - " + patternName ; document . querySelector ( '.pl-js-open-new-window' ) . setAttribute ( "href" , urlHandler . getFileName ( patternName ) ) ; }
based on a click forward or backward modify the url and iframe source
@param  {Object}      event info like state and properties set in pushState()
based on a click forward or backward modify the url and iframe source