Skip to content

Cave Browser API

james edited this page Nov 4, 2017 · 1 revision

These methods are part of the cave JavaScript API. Among other things, they provide means to scroll the page and check if the user is still connected to the internet.

Methods

brw_scrollImmediately

  • Arguments:

    • {Number} x
    • {Number} y
  • Usage:

    Scroll the window to position (x, y) - similar to window.scroll.

brw_getScrollTopX

  • Returns: {Number}

  • Usage:

    Get the current X position of the window relative to the document.

brw_getScrollTopY

  • Returns: {Number}

  • Usage:

    Get the current Y position of the window relative to the document.

brw_isOnline

  • Returns: {Boolean}

  • Usage:

    Check if the user is currently connected to the internet.

brw_notifyPageMoving

  • Usage:

    (untested) Seems to be used whenever a scroll is about to happen. Perhaps it triggers a transition?

brw_notifyPageMovingEx

  • Arguments:

    • {Boolean} useWhiteFlag
  • Usage:

    (untested) Same as brw_notifyPageMoving, but seems to include a white fade.

brw_beginAtomicSave

  • Usage: (unknown).

brw_endAtomicSave

  • Usage: (unknown).