+ 17
How to use window.location.href from Sololearn app version?
I was doing something which requires me to use URL of current code, so used window.location.href which works fine on the web version but it returns "about:blank" on app. Why is that Happening? Is there any way to fix it? https://code.sololearn.com/Winhn03SPyEd/?ref=app
14 Antworten
+ 10
because the app is not a browser, it just use the webview api
+ 9
Amethyst Animion
Ik, but is there anyway I can get url in app as well?
+ 7
🐼 Coding Panda 🐼 nope, i ever tried to get it long time ago and not found any way. The best way is to run the code on browser
+ 6
+ 6
🐼 Coding Panda 🐼 What URL are you expecting?
If you were on a browser visiting www.google.com, the location.href value refers to the URL of the remote web server.
However, in the case of the running the code via the SoloLearn app, there is no remote server relative to the SL app. The client and the server are the same.
+ 5
It's not running in a server and neither in your filesystem. So, it's origin is null and location is about:blank
+ 3
I don't think we can retrieve url from webview, it's control on app level, unless Sololearn developer release this information from app coding of Sololearn app.
+ 2
It's not running in a server and neither in your filesystem. So, it's origin is null and location is about:blank. Exactly what i thought too.
0
because its different operating system between app and windows so you can't copy the URL
0
Nkanyane Rampai yea... here's your first tip: start using the app. 😏
2nd tip: dont thread hijack and respond to questions with appropriate answers.
0
Добрый 6
- 2
Hola
- 4
Selam meraba
- 4
I'm so new here and I really want to start learning ... Is there anyone who can offer some help?