Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error launch example Html Drawable #7

Open
GianlucaP99 opened this issue May 27, 2021 · 6 comments
Open

Error launch example Html Drawable #7

GianlucaP99 opened this issue May 27, 2021 · 6 comments

Comments

@GianlucaP99
Copy link

Hi,
I was testing some examples to check which one could do for me.

it seems very interesting to me the possibility of using Html code in AR.

I would have an error: https://pastebin.pl/view/44d7d163

I reported the error lines.

I take this opportunity to also ask for additional information.
is it possible to inject some code into this external html file?
I would need to pass the code from React to the World (I do it with the callJavascript method) now the next step is to inject it into the html AR file and not into the index file with the simple document ...

Maybe i could do this by calling the evalJavaScript method when the drawable has finished loading? I prefer to ask for an opinion.

The configuration is the same as described in issue #2

Thank you.

@joaquinlom
Copy link
Owner

I haven't tested against an HTML Drawable yet, but for that feature, I would implement a global function in the index.html, which will pass the string passed by the callJavascript in React. Just remember that each HTMLDrawable is self contain and you need to have access to the HTMLDrawable outside the AR File. or if you can have only 1 HTMLDrawable simple set the drawable globally and in the callJavascript reference manually
callJavascript(htmlDrawable.evalJavaScript('alert("This")'))

@GianlucaP99
Copy link
Author

perfect, thank you so much for the advice on how to inject javascript into html drawable.
I am waiting for the resolution of the fatal error generated by the use of html drawables, if you have managed to replicate the error.

@joaquinlom
Copy link
Owner

I was able to fix it but encounter another bugs while testing. The next version will change how Android support Wikitude

@GianlucaP99
Copy link
Author

GianlucaP99 commented May 29, 2021

Perfect, a bug fix release could be usefull. I would like to test this functionality as well to be able to add it, if interesting in my test project.
Thank you

@joaquinlom
Copy link
Owner

Sure, but because it's only working in the first run , then doesn;t work anymore I don't think it would be useful hehe, You can share it if you want.

@GianlucaP99
Copy link
Author

if the html drawables work only at the first start then I agree that they are not very useful, at this point I continue the implementation of the other types, if a nice example comes out I will share it for sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants