Forum

Methodology

Toolbox

Platform

Community

desktop
touch-pad
touch-phone

ua

Use this block to collect data about the user's browser.

Overview

Elements of the block

Element Usage Description
svg deps Checks whether the browser supports SVG format.

Public block technologies

The block is implemented in:

  • bh.js
  • bemhtml

Description

The block enables an inline script that adds CSS classes to the <html> tag to specify whether JavaScript is enabled – ua_js_no or ua_js_yes.

It doesn't have a visual representation on the page.

Used inside the page block. You normally don't need to connect it to the page yourself.

Elements of the block

svg element

This element enables an inline script that adds CSS classes to the <html> tag to specify whether SVG is supported – ua_svg_no or ua_svg_yes.

It doesn't have a visual representation on the page.

To use it, add the element to the deps.js dependencies file for the block that needs information about SVG support:

Open in a new window

Module ua

Detect some user agent features (works like jQuery.browser in jQuery 1.8)