# all files / src/ HtmlSnippet.js

100% Statements 5/5
100% Branches 0/0
100% Functions 2/2
100% Lines 5/5

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30

    1×

    1146×

    1×

    1×
    2052×

     /**
     * Wraps an HTML snippet for use with configuration values which default
     * to strings.  This bypasses the default html-escaping done to string
     * values.
     *
     * @class
     *
     * @constructor
     * @param {string} [content] HTML content
     */
    OO.ui.HtmlSnippet = function OoUiHtmlSnippet( content ) {
    	// Properties
    	this.content = content;
    };

    /* Setup */

    OO.initClass( OO.ui.HtmlSnippet );

    /* Methods */

    /**
     * Render into HTML.
     *
     * @return {string} Unchanged HTML snippet.
     */
    OO.ui.HtmlSnippet.prototype.toString = function () {
    	return this.content;
    };