Could you use instead the value defined in the DOM?
`return dom.subject.maxLength` should work. Actually you could even cache this value because it should not change dynamically.