CHAPTER 16

image

Browsing Web Pages

In this chapter, you will learn:

  • What WebView is
  • What components are used with WebView
  • How to create a web browser
  • How to access the browsing history
  • How to execute JavaScript code from JavaFX and vice versa
  • How to access the web page DOM
  • How to set User-Agent HTTP headers
  • How to set a user style for the web page and how to style WebView with CSS

What Is a WebView?

JavaFX provides a web component that can be used as an embedded web browser in a JavaFX application. It is based on WebKit, which is an open source web browser engine. It supports:

  • Viewing HTML5 content with CSS and JavaScript
  • Access to the DOM of the HTML ...

Get Learn JavaFX 8: Building User Experience and Interfaces with Java 8 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.