resource loading doesn't work in browser
Closed this issue · 5 comments
gavinking commented
I can't use ceylon.locale
in the Web IDE because apparently Resource.textContent()
is not supported in the web browser environment. This is a limitation I was not aware of, and a pretty nasty one!
quintesse commented
@gavinking then you might need to weigh in on that issue. Are you okay with adding async versions of those methods or do you think we should come up with some other solution?
gavinking commented
I've solved this, at least as far as .properties
files go, by simply embedding resource text data in the .js
file. Each resource file is exported as a field of type String
of the JS module.
Sure, it bloats out the .js
file of any module like ceylon.locale
with a whole lotta resources, but is there really an obviously better way?