我用 Node.js 開發自己的 Web 瀏覽器

42324a396666b26cefbe250aa60e5f26?s=47 Fred Chien
August 05, 2013

我用 Node.js 開發自己的 Web 瀏覽器

失去瀏覽器為依靠的 JavaScript,令人感到不安、充滿焦慮。到底是瀏覽器成就了我,還是我成就了瀏覽器? 既然感到害怕,就面對他吧!既然是 Open Source Developer,就動手做吧!用 Node.js 來開發自己的 Web 瀏覽器,支援 HTML5/CSS3/WebGL 等最新標準的瀏覽器!

42324a396666b26cefbe250aa60e5f26?s=128

Fred Chien

August 05, 2013
Tweet

Transcript

  1. 5.
  2. 6.
  3. 11.

  4. 13.
  5. 18.
  6. 27.
  7. 32.
  8. 47.
  9. 51.

    How to use Barbarian var Barbarian = require('barbarian'); var barbarian

    = new Barbarian(); barbarian.init(function() { barbarian.createWindow('http://coscup.org/'); });
  10. 52.
  11. 53.
  12. 56.

    • Open source project • Founded By Marshall Greenblatt in

    2008 • Web browser control based on Chromium CEF
  13. 57.

    • Blink! • Using CEF in your native application •

    Support all of Chromium features • HTML5/CSS3/WebGL • WebRTC, Webcam and speech input • off-screen rendering support • Cross-platform(Linux, Windows, Mac) • C/C++, Java, .Net, .net/Mono, Python, Delphi CEF Features JavaScript?
  14. 58.
  15. 59.
  16. 60.
  17. 62.

    CEF3 • Multi process implementation using the Chromium Content API.

    • Better performance • Faster access new features
  18. 65.
  19. 67.

    • Event-loop ◦ Using libuv to do integration • Multi-process

    ◦ making a single executable binary ◦ UI/Renderer Process • Multi-thread ◦ buggy ◦ Lost events ◦ Event Handler crashes ◦ Segmentation faults with Node.js Issues
  20. 73.
  21. 75.
  22. 78.

    • Page Control • Extenssion • IPC between Node.js and

    Chromium’s JS Engine • API to customize URL prefix (ex, hello://) • Cross-platform TODO
  23. 79.
  24. 84.