Adding javascript in local html
Nobody has claimed this yet.
- Dominant language
- Objective-C++
- Stars
- 2.7k
- Forks
- 734
- Avg merge
- 11h 39m
- Merged PRs (30d)
- 1
Description
Hi,
I'm loading an html file in webview and i have to add text, Why i can't reference by id an element and add text?
For example, i have:
var urlLocal = UniWebViewHelper.StreamingAssetURLForPath("local_www/game.html");
webView.Load(urlLocal);
I have to do for example an document.getElementById for add text, or modify attributes and don't work. Instead if I do an alert if it works. Im adding the javascript to webview with EvaluateJavaScript.
Thanks,
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the issue's local_www/game.html example and the calls to UniWebViewHelper.StreamingAssetURLForPath, Load, and EvaluateJavaScript. Reproduce the difference between alert and document.getElementById, then determine the relevant webview behavior and verify that DOM text or attribute changes work in the local page.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100