Docs
Language Manual
  • Introduction
  • Cheatsheet
JavaScript
  • BuckleScript
  • ReasonReact
  • GenType
API
Overview
JavaScript
  • Belt Stdlib
  • Js Module
PlaygroundBlogCommunity
  • Playground
  • Blog
  • Community
  • Twitter
  • Discord
  • Github
BuckleScriptv7
Overview
  • Introduction
  • Installation
  • New Project
  • Try
  • Concepts Overview
  • Upgrade Guide to v7
Interop
  • Overview
  • Cheatsheet
  • Embed Raw JavaScript
  • Common Data Types
  • Intro to External
  • Bind to Global Values
  • Null, Undefined & Option
  • Object
  • Object 2
  • Class
  • Function
  • Property access
  • Return Value Wrapping
  • Import & Export
  • Regular Expression
  • Exceptions
  • JSON
  • Pipe First
  • Generate Converters & Helpers
  • Better Data Structures Printing (Debug Mode)
  • NodeJS Special Variables
  • Handling JS Naming Collisions
  • Miscellaneous
  • Browser Support & Polyfills
  • Decorators
Build System
  • Overview
  • Configuration
  • Automatic Interface Generation
  • Interop with Other Build System
  • Performance
  • Advanced
Standard Library
  • Overview
Advanced
  • Conditional Compilation
  • Extended Compiler Options
  • Use Existing OCaml Libraries
  • Difference from Native OCaml
  • Compiler Architecture & Principles
  • Comparison to Js_of_ocaml
Docs / BuckleScript / BrowserSupportPolyfills

Browser Support & Polyfills

BuckleScript compiles to JavaScript ES5, with the exception of allowing to compile to ES6 module import/export.

For old browsers, you also need to polyfill TypedArray. The following OCaml standard library functions require it:

  • Int64.float_of_bits

  • Int64.bits_of_float

  • Int32.float_of_bits

  • Int32.bits_of_float

If you don't use these functions, you're fine. Otherwise, it'll be a runtime failure.