Skip to content
This repository was archived by the owner on Jul 5, 2025. It is now read-only.
This repository was archived by the owner on Jul 5, 2025. It is now read-only.

Render pages supplied as text #58

Open
@axtens

Description

@axtens

Granted, the fragment entered in to page.content is not a full page of HTML. All the same, the response Error getting value from 'focusedFrameName' on 'TrifleJS.API.Modules.WebPage'. lacks grace.

C:\Users\Bruce\Downloads\headless\Trifle>TrifleJS.exe
triflejs> var page = require('webpage').create();
null
triflejs> page
{
  "uuid": "1986bc15",
  "title": "",
  "url": "about:blank",
  "uri": "about:blank",
  "content": "<HTML></HTML>\u0000",
  "plainText": "",
  "customHeaders": {},
  "windowName": "",
  "framesCount": 0,
  "framesName": [],
  "frameName": "",
  "frameTitle": "",
  "frameUrl": "about:blank",
  "frameContent": "",
  "framePlainText": "",
  "focusedFrameName": "",
  "canGoBack": false,
  "canGoForward": false,
  "loading": false,
  "cookies": [],
  "viewportSize": {
    "width": 400,
    "height": 300
  },
  "zoomFactor": 1.0,
  "clipRect": {
    "top": 0,
    "left": 0,
    "width": 0,
    "height": 0
  }
}
triflejs> page.content = "<h1>Hello</h1>"
<h1>Hello</h1>
triflejs> page.content
<h1>Hello</h1>
triflejs> page
 (0,0): Error getting value from 'focusedFrameName' on 'TrifleJS.API.Modules.WebPage'.

Bruce/bugmagnet

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions