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

WIP Examples: header.html use raw html tags instead of bookmarklet #93

Closed
wants to merge 2 commits into from

Conversation

stokito
Copy link

@stokito stokito commented Nov 28, 2021

And I didn't tested the header.html with Apache but I just put an index.html file into doc root and now it's shown fine when uses the bookmarklet loader.
But when I used the plain html tags I got an error in console:

Uncaught TypeError: Invalid container element: 'null'.
    n https://cdn.jsdelivr.net/gh/dom111/webdav-js/src/webdav-min.js:1

I have no idea why it doesn't works. Could you investigate it?
I also tried to use webdav.js instead of webdav-min.js but it doesn't works at all because has imports.

And I still don't get why the comment added in the end.

@stokito stokito marked this pull request as draft November 28, 2021 22:49
@dom111
Copy link
Owner

dom111 commented Jan 16, 2022

Hey, apologies for the delay in getting back to you on this!

So the <!-- at the end is to comment out what Apache would normally have on the page so that the UI is entirely rendered by webdav-js, but it could be removed if needed.

Weird that you're seeing the errors... Do you see the problem when you run the Docker test (if you're able to?)

Also, what browser are you using?

@dom111 dom111 self-assigned this Jan 16, 2022
@dom111 dom111 added the bug label Jan 16, 2022
@stokito
Copy link
Author

stokito commented May 22, 2022

I get it wat's a problem was: the javascript is loaded and executed before the html body rendered. So to fix that it should be enough to add a defer attribute or setup onload/onready hook.
https://www.w3schools.com/tags/att_script_defer.asp#:~:text=The%20defer%20attribute%20is%20a,the%20page%20has%20finished%20parsing.

I don't have a time to check it but if you are interested please try.

dom111 added a commit that referenced this pull request Aug 26, 2022
dom111 added a commit that referenced this pull request Aug 27, 2022
@dom111
Copy link
Owner

dom111 commented Aug 27, 2022

Merged as part of #109.

Also amended the build process to prevent these being overwritten.

Thank you!

@dom111 dom111 closed this Aug 27, 2022
@stokito stokito deleted the header.html branch August 27, 2022 20:18
@stokito
Copy link
Author

stokito commented Aug 27, 2022

Thank you @dom111
I'll test it latter

dom111 added a commit that referenced this pull request Aug 27, 2022
dom111 added a commit that referenced this pull request Aug 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants