create read only reference to JS object