UNPKG

433 BJavaScriptView Raw
1'use strict';
2var $ = require('../internals/export');
3var createHTML = require('../internals/create-html');
4var forcedStringHTMLMethod = require('../internals/string-html-forced');
5
6// `String.prototype.link` method
7// https://tc39.es/ecma262/#sec-string.prototype.link
8$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('link') }, {
9 link: function link(url) {
10 return createHTML(this, 'a', 'href', url);
11 }
12});