The other answers - while providing various work-abouts - are lacking in details about "why" the original works or how to "replicate" the behavior in JavaScript. As such, this is a direct answer that avoids recommendations for non-forward compatible code.
First off, the 'duplicate CSS properties' trick works because a modern CSS engine will ignore properties with values that it does not understand.
Thus the original code can be semantically written as the following (note that the order is reversed as CSS is last-valid-and-assigned-property-values wins):
// assigns style property if value (-moz-calc..) is understood
element.style.minHeight = "-moz-calc(100% - 291px)";
if (element.style.minHeight === "") {
// assigns style property if value (calc..) is understood
element.style.minHeight = "calc(100% - 291px)";
}
That is, the CSS min-height
property only ever has one value for the inline style.
More directly, the code could even be written without condition check. That is, the following "works" as invalid / non-understood property values should not result in an update:
element.style.minHeight = "calc(100% - 291px)";
element.style.minHeight = "foo"; // min-height NOT updated
Thus we can write the original following normal (note that "-webkit-" is first) CSS property assignment shadowing where the 'CSS standard' value will be applied if/once it is supported by a browser:
// min-height set in webkit browser only
element.style.minHeight = "-webkit-calc(100% - 291px);";
// min-height set (reset in webkit) IF AND ONLY IF browser supports calc
element.style.minHeight = "calc(100% - 291px)";
If the desire was to get "exact" browser reproduction, that can be done by assigning the style attribute directly. (In this case I've left the original CSS property order the same.)
element.setAttribute("style",
"min-height: calc(100% - 291px); min-height: -webkit-calc(100% - 291px);");
// Only *one* of these values was assigned to the CSS style element!
console.log(element.style.minHeight)
However, using a stylesheet, even an inline one, would be my first preference.