|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
626 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 | var uncurryThis = require('../internals/function-uncurry-this');
|
|---|
| 3 | var requireObjectCoercible = require('../internals/require-object-coercible');
|
|---|
| 4 | var toString = require('../internals/to-string');
|
|---|
| 5 |
|
|---|
| 6 | var quot = /"/g;
|
|---|
| 7 | var replace = uncurryThis(''.replace);
|
|---|
| 8 |
|
|---|
| 9 | // `CreateHTML` abstract operation
|
|---|
| 10 | // https://tc39.es/ecma262/#sec-createhtml
|
|---|
| 11 | module.exports = function (string, tag, attribute, value) {
|
|---|
| 12 | var S = toString(requireObjectCoercible(string));
|
|---|
| 13 | var p1 = '<' + tag;
|
|---|
| 14 | if (attribute !== '') p1 += ' ' + attribute + '="' + replace(toString(value), quot, '"') + '"';
|
|---|
| 15 | return p1 + '>' + S + '</' + tag + '>';
|
|---|
| 16 | };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.