Coder Social home page Coder Social logo

Query parameters about mauihybridwebview HOT 8 CLOSED

eilon avatar eilon commented on September 15, 2024
Query parameters

from mauihybridwebview.

Comments (8)

Eilon avatar Eilon commented on September 15, 2024 1

I created PR #6 to fix this. When (if 😄 ) that PR passes, you'll be able to download a ZIP that has a NuGet package that you can use in your app:

image

from mauihybridwebview.

Eilon avatar Eilon commented on September 15, 2024 1

I'll take another look, thanks for checking!

from mauihybridwebview.

IeuanWalker avatar IeuanWalker commented on September 15, 2024

@Eilon Sorry only just got time to pick this back up.

It's still an issue.

Looks like the check you added is looking at a different URL than the one set on MainFile -
image
The URL set on MainFile is MainFile="pdfjs/web/viewer.html?file=../../Dissertation.pdf"

Here is a repo - https://github.com/IeuanWalker/Maui.PdfViewer

from mauihybridwebview.

IeuanWalker avatar IeuanWalker commented on September 15, 2024

Also from your PR i couldn't see where you re-add the query parameters

from mauihybridwebview.

Eilon avatar Eilon commented on September 15, 2024

@IeuanWalker I have a new attempt to fix this issue: #17

This adds a new StartPath property that you can set to something like somefile.html?a=b&c=d. Please note that the MainFile property must be set to a specific file, which is what gets loaded if there is no other path specified (e.g. a request to /).

So in your case you could probably do something like this:

<hwv:HybridWebView ... MainFile="pdfjs/web/viewer.html" StartPath="?file=../../Dissertation.pdf" />

And that will load the view.html file as the default file, but the initial navigation will go to the particular query string with the PDF file specified.

from mauihybridwebview.

IeuanWalker avatar IeuanWalker commented on September 15, 2024

Thanks @Eilon, will try and test it out now

Looks like its a different GitHub action than the last PR you built and no Artifacts were created

from mauihybridwebview.

IeuanWalker avatar IeuanWalker commented on September 15, 2024

@Eilon just tried a bunch of stuff but getting this error logged in the console from the JS, which prevents the PDFViewer from working -
"Uncaught ReferenceError: require is not defined", source: https://0.0.0.0/viewer.js (580)

Using the Standard Maui webview i dont get this error and the PDF loads fine.

I've done a bunch of search, but cant see why this error would appear as its still using the standard Android.Webkit.WebView

from mauihybridwebview.

Eilon avatar Eilon commented on September 15, 2024

Hi merged the PR, and the main build should produce artifacts in ~20min or so.

If you can create a repro project that uses the latest build and it still has the problem, please post that project and let me know so I can further investigate.

This control internally uses the same platform controls that the .NET MAUI WebView uses, but it configures it in a different way, so there could be some issues there that I will need to debug.

from mauihybridwebview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.