I've been trying to integrate this API: https://googlechrome.github.io/samples/presentation-api/ with my project.

However, it always generates this error in the browser console:

Uncaught ReferenceError: PresentationRequest is not defined

It was perfectly fine if I create a new project with just 2 html to test out the controller and web presentation.

Is it due to javascript conflict with my project's .js files?

  • It is more likely to be a "scoping" issue rather than a "conflict" but we can't help specifically because you haven't shown the actual, relevant scripts. What does "just 2 html" mean? I couldn't correct that part when I was editting. – mickmackusa Jun 24 '19 at 8:39
  • Are you sure you're not testing in a browser that doesn't support PresentationRequest? developer.mozilla.org/en-US/docs/Web/API/PresentationRequest – Lodder Jun 24 '19 at 9:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.