It seems that, according to the HTML5 spec, the value property of the textarea element should return '\r\n' for a newline:
The element's value is defined to be the element's raw value
with the following transformation applied:
Replace every occurrence of a "CR" (U+000D) character not followed by
a "LF" (U+000A) character, and every occurrence of a "LF" (U+000A)
character not preceded by a "CR" (U+000D) character, by a
two-character string consisting of a U+000D CARRIAGE RETURN "CRLF"
(U+000A) character pair.
Following the link to 'value' makes it clear that it refers to the value property accessed in javascript:
Form controls have a value and a checkedness. (The latter is only used
by input elements.) These are used to describe how the user interacts
with the control.
However, in all five major browsers (using Windows, 11/27/2015), if '\r\n' is written to a textarea, the '\r' is stripped. (To test: var e=document.createElement('textarea'); e.value='\r\n'; alert(e.value=='\n');) This is true of IE since v9. Before that, IE was returning '\r\n' and converting both '\r' and '\n' to '\r\n' (which is the HTML5 spec). So... I'm confused.
To be safe, it's usually enough to use '\r?\n' in regular expressions instead of just '\n', but if the newline sequence must be known, a test like the above can be performed in the app.