Skip to main content
The ScramjetFrame class provides an abstraction over proxy iframe creation, allowing you to manage isolated browsing contexts without worrying about proxy internals.

Creating a frame

Frames are created using the createFrame() method on your ScramjetController instance:
You can also pass an existing iframe element to createFrame() if you want to use a pre-configured iframe:
The ScramjetFrame class provides several methods for controlling navigation within the isolated context: Use the go() method to navigate to a new URL:

Browser history navigation

Accessing frame properties

The ScramjetFrame instance provides access to useful properties:

Current URL

Get the current proxified URL:

ScramjetClient instance

Access the ScramjetClient instance running inside the iframe:
The client property gives you access to the Scramjet instance running within the iframe’s context, allowing for advanced manipulation if needed.

Raw iframe element

Access the underlying HTMLIFrameElement:

Building a browser interface

Here’s a complete example of building a simple browser interface with navigation controls:

Multiple frames

You can create and manage multiple frames simultaneously:

Advanced usage

Detecting when context is ready

Listen for the contextInit event to know when the frame has fully initialized:

Styling frames

Style the iframe element to fit your application:

Frame cleanup

When you’re done with a frame, remove it from the DOM:

Event handling

Learn how to handle navigation, URL changes, and download events

Cookie management

Manage cookies within isolated frame contexts