API: Webpage

API Version Uses canvas Graphics libraries AB framework Worlds using this API Starter Worlds
Webpage 1.0 No None No 32 Worlds Starter Worlds

This API is for Worlds with no canvas. That is, the World is a web page with regular HTML elements. This site is about uploading JS (not HTML) to make a World which normally "runs" on a canvas element on a page. This API allows you make a World with no canvas.

This API has the following features:

  • It gives you a blank page, and you use JS to insert whatever HTML and CSS and data you want on the page.
  • Your World can just document.write HTML and CSS into the body.
  • The API sets a page title.
  • There is no run header, so as not to interfere with your page layout.
  • You reload and close the page like any other tab.
  • Includes jQuery 3.3.1.

  • The style of the blank page is a body with margin 0 and padding 0. You can change it using JS like this:
      $('body').css( "margin", "20px" );
      $('body').css( "padding", "20px" );


  • The screenshot does not assume there is a canvas. Instead it takes a screenshot of the HTML.
  • It uses the html2canvas library to build a screenshot of your page using JS.
  • The html2canvas library has some limitations and may not be able to accurately screenshot your page.



Examples of Worlds that use this API:

Flickr World
137 runs ♦ 0 likes
By Starter user  
Created: 12 Aug 2018
Modified: 19 May 2019
Demo of "Web page" API. Just use JS to make a web page. This page gets images from Flickr using ...

The background is a program, showing the JavaScript graphics used on this site.
The globes light up when you log in.

© Ancient Brain Ltd. 2018-19. All rights reserved.

Ancient Brain ™ is a trademark of Ancient Brain Ltd.

Platforms      Stats      The name      Terms and conditions      Contact

Call for partners      Bug bounty      Classes in Dublin