Electron tej thaj chaw deb yog dab tsi?
Electron tej thaj chaw deb yog dab tsi?

Video: Electron tej thaj chaw deb yog dab tsi?

Video: Electron tej thaj chaw deb yog dab tsi?
Video: Yog tsis ntsib koj (Official Music Video) - Kab Npauj Laim 2024, Kaum ib hlis
Anonim

Cov nyob deb module muab txoj hauv kev yooj yim los ua cov txheej txheem sib txuas lus (IPC) ntawm cov txheej txheem renderer (web page) thiab cov txheej txheem tseem ceeb. Hauv Hluav taws xob , GUI-hais txog modules (xws li kev sib tham, ntawv qhia zaub mov thiab lwm yam) tsuas yog muaj nyob rau hauv cov txheej txheem tseem ceeb, tsis yog nyob rau hauv cov txheej txheem renderer.

Ua qhov no hauv kev xav, dab tsi yog electron txheej txheem?

Main thiab Renderer Cov txheej txheem Hauv Hluav taws xob , cov txheej txheem uas khiav pob. json's main script is called the main txheej txheem . Txij li thaum Hluav taws xob siv Chromium los tso saib cov nplooj ntawv web, Chromium's multi- txheej txheem architecture kuj tseem siv tau. Txhua lub vev xaib hauv Hluav taws xob khiav hauv nws tus kheej txheej txheem , uas yog hu ua renderer txheej txheem.

Kuj Paub, ua li cas koj debug ib tug electron? Hluav taws xob - Kev debugging . Peb muaj ob txheej txheem uas khiav peb daim ntawv thov - cov txheej txheem tseem ceeb thiab cov txheej txheem renderer. Txij li cov txheej txheem renderer yog ib qho raug tua hauv peb lub qhov rais browser, peb tuaj yeem siv Chrome Devtools rau debug nws. Txhawm rau qhib DevTools, siv qhov shortcut "Ctrl+Shift+I" lossis tus yuam sij.

Hauv qhov no, lub tshuab hluav taws xob puas yuav tawm?

tawm (), Electron yuav thawj sim rau kaw tag nrho cov qhov rais thiab ces emit lub yuav - tawm xwm txheej, thiab nyob rau hauv cov ntaub ntawv no lub qhov rais-tag nrho-kaw kev tshwm sim yuav tsis raug tso tawm.

Dab tsi browser siv electron?

Ntawm nws qhov backend, Electron siv Node. js thiab, ntawm nws qhov frontend, Chromium yog siv los ua cov ntawv thov. Kev sau cov lej hauv Electron zoo ib yam li kev sau cov lej hauv browser vim tias koj tuaj yeem siv tag nrho DOM API's tab sis nrog tag nrho cov Node. js API muaj thiab.

Pom zoo: