04 - Electronjs contextBridge and how to use main process functions inside renderer

Поделиться
HTML-код
  • Опубликовано: 2 ноя 2024

Комментарии • 17

  • @decepi
    @decepi Год назад +4

    My friend, after hours fighting to get this working tonight, and getting about ready to just build this app in something else, you saved the day with a clear example of HOW and WHY to setup each part. THANK YOU!

  • @rarsa8375
    @rarsa8375 Год назад +1

    Excellent video, thank you

  • @hyperv4758
    @hyperv4758 Год назад +1

    Good video,
    but
    I think the whole point of contextBrige and IPC is to keep nodeIntegration : False

    • @amitavroydev
      @amitavroydev  Год назад

      Is that so? Then how will the integration work?
      Will you be able to guide to a resource for the same?

    • @karanxdev
      @karanxdev Год назад

      yes you are right , i will explain how to do this

  • @SinhtUpthereal
    @SinhtUpthereal Год назад

    i followd exactly ur instructions but it is not working for me i get following error message "Uncaught (in promise) TypeError: electron is undefined"

    • @amitavroydev
      @amitavroydev  Год назад

      Check if your imports are correct. How can electron be undefined.

    • @johnsonare6452
      @johnsonare6452 Год назад

      I am getting the same error, how did you solve it please

    • @adesupriyadi5844
      @adesupriyadi5844 11 месяцев назад

      same with me. inside devTools when typing window.electron its undefined

  • @harikrishnabomen8650
    @harikrishnabomen8650 Год назад +1

    without running build and npm run start how it is updating

    • @amitavroydev
      @amitavroydev  Год назад +1

      In dev mode it runs through a server. And on prod it's a build

    • @ritikjain4947
      @ritikjain4947 4 месяца назад

      @@amitavroydev how to that can you tellme

    • @francislainycampos2035
      @francislainycampos2035 2 месяца назад

      @@ritikjain4947 I was struggling with this also, but I've just managed to get it working by having pathname back to './index.html.' and mainWindow.loadUrl() back to use 'localhost:3000'. Not sure if it's the best way, though, as I now have the lines I'm not using for the build step commented out and manually uncomment them and comment these ones for localhost whenever I need the build command to work again.

  • @richmondxaviergnanhi8611
    @richmondxaviergnanhi8611 Год назад +1

    Thank

    • @amitavroydev
      @amitavroydev  Год назад

      Welcome and do subscribe if you haven’t already 🙂