JavaScript - Very simple method of objects casting.

Hello.
In some time I faced with question – how to cast objects to some classes, types, with preserving values of the elements of the object.
For example, I have some class:
class MyProduct {
	setBaseTrackingInfo(BaseTrackingInfo) {
		this.BaseTrackingInfo = BaseTrackingInfo;
	}
	getBaseTrackingInfo() {
		return this.BaseTrackingInfo;
	}
	
	setElement(productElement) {
		this.productElement = productElement;
	}
	getElement() {
		return this.productElement;
	}

	setDimensions(Dimensions) {
		this.Dimensions = Dimensions;
	}
	getDimensions() {
		return this.Dimensions;
	}

	setScreenshot(screenshot) {
		this.screenshot = screenshot;
	}
	getScreenshot() {
		return this.screenshot;
	}
}
And some code:
var mt = new MyProduct();
mt.setDimensions(dimensions);
mt.setElement($(productElement)[0].outerHTML);

chrome.runtime.sendMessage({
		from : 'makeScreenshot',
		mtObj : mt,
});
I need to correctly cast it in the receiver function 
chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) {

	if (request.from == 'makeScreenshot') {

                // Here is we created object with MyProduct class prototype ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create )
		var mp = Object.create(MyProduct.prototype);
		for (var prop in request.mtObj) {
                        // Here we assign values of the received object to our object
			mp[prop] = request.mtObj[prop];
		}

                // And here we using our class with assigned values...
		var dimensions = mp.getDimensions();
                // ... That we can use in some function...
		someFunction(mainTabId, dimensions, mp);
	}

});