tauri-apps / tauri

Build smaller, faster, and more secure desktop and mobile applications with a web frontend.
https://tauri.app
Apache License 2.0
82.76k stars 2.48k forks source link

How can i access plugin from vanila(pure javascript) #7807

Closed kingsanu closed 1 year ago

kingsanu commented 1 year ago

Describe the bug

I'm not using NPM so i don't have option like follwing

import {printers, print_file, jobs, job, restart_job, pause_job, resume_job, remove_job} from "tauri-plugin-printer";

but i've option like following var { isPermissionGranted, requestPermission, sendNotification } = window.TAURI.notification;

so how can i access that tauri-plugin-printer in my javascript?

Reproduction

No response

Expected behavior

No response

Platform and versions

latest

Stack trace

No response

Additional context

No response

amrbashir commented 1 year ago

As I explained in another issue, please use the issue tracker for bug and feature requests related to tauri, not to ask for help, if you need help please join our discord, or ask in the disucssions tab.

amrbashir commented 1 year ago

but i've option like following var { isPermissionGranted, requestPermission, sendNotification } = window.TAURI.notification;

so how can i access that tauri-plugin-printer in my javascript?

Reach out to the plugin author to provide a global object or use a cdn service to serve you the npm package.