You are here

browsersync-snippet.html.twig in Browsersync 8

Same filename and directory in other branches
  1. 8.2 templates/browsersync-snippet.html.twig

Default theme implementation to display a Browsersync snippet.

Available variables:

  • host: The host or IP address the Browsersync socket is running on.
  • port: The port the Browsersync socket is running on.

File

templates/browsersync-snippet.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display a Browsersync snippet.
  5. *
  6. * Available variables:
  7. * - host: The host or IP address the Browsersync socket is running on.
  8. * - port: The port the Browsersync socket is running on.
  9. */
  10. #}
  11. <script id="__bs_script__">
  12. document.write("<script async src='//{{ host }}:{{ port }}/browser-sync/browser-sync-client.js'><\/script>".replace("HOST", location.hostname));
  13. </script>