How to use kotlin-playground - 2 common examples

To help you get started, we’ve selected a few kotlin-playground examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github JetBrains / kotlin-web-site / static / js / page / common.js View on Github external
$(document).ready(function () {
  kotlinPlayground('.sample');

  CodeMirror.colorize($('.code._highlighted'));

  const html = document.getElementsByTagName('html')[0];

  html.className = html.className.replace('no-js', '');

  // OS detection
  if (navigator.userAgent.indexOf('Linux') > -1)
    html.className += ' os_linux';

  // Browser detection
  if ('chrome' in window)
    html.className += ' ua_chrome';
  else if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1)
    html.className += ' ua_firefox';
github JetBrains / kotlin-web-site / static / js / page / index / index.js View on Github external
$(document).ready(function () {
  kotlinPlayground('.sample')
  initPopups();
  initTabs();
});

kotlin-playground

Self-contained component to embed in websites for running Kotlin code

Apache-2.0
Latest version published 10 months ago

Package Health Score

66 / 100
Full package analysis

Popular kotlin-playground functions