Hello everyone! I'm trying to add some js mappings...
# compose-web
g
Hello everyone! I'm trying to add some js mappings for my web target and the script in question happens to add certain fields to the
window
object. However, so far I was not able to find a proper way of implementing the mapping Let's say the script provides
window.foo
which is a
string
value When I tried to add a mapping I did something like this
external val Window.foo: String
, however apparently I cannot make an extension property external and the solution offered by my IDE (
asDynamic
) also fails miserably. What is the right way of tackling it?
e
in JS,
window
is the global object, so it's simply
Copy code
external val foo: String
and not
Window.
☝🏼 1
g
Thank you, that was indeed the solution!