/
githubmirror
/
node
Обзор
Документация
Войти
/
githubmirror
/
node
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
deps/v8/src/builtins/string-html.tq
140 строк
5 KB
Michaël Zasso
deps: update V8 to 14.1.146.11
04 окт 2025, 19:47
Не верифицирован
04 окт 2025, 19:47
7772a2d
Код
Авторство
О чём код?
// Copyright 2019 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. namespace string { extern runtime StringEscapeQuotes(Context, String): String; // https://tc39.github.io/ecma262/#sec-createhtml transitioning builtin CreateHTML( implicit context: Context)(receiver: JSAny, methodName: String, tagName: String, attr: String, attrValue: JSAny): String { const tagContents: String = ToThisString(receiver, methodName); let result = '<' + tagName; if (attr != kEmptyString) { const attrStringValue: String = StringEscapeQuotes(context, ToString_Inline(attrValue)); result = result + ' ' + attr + '=\"' + attrStringValue + '\"'; } return result + '>' + tagContents + '</' + tagName + '>'; } // https://tc39.github.io/ecma262/#sec-string.prototype.anchor @incrementUseCounter('v8::Isolate::kHtmlWrapperMethods') transitioning javascript builtin StringPrototypeAnchor( js-implicit context: NativeContext, receiver: JSAny)( ...arguments): String { return CreateHTML( receiver, 'String.prototype.anchor', 'a', 'name', arguments[0]); } // https://tc39.github.io/ecma262/#sec-string.prototype.big @incrementUseCounter('v8::Isolate::kHtmlWrapperMethods') transitioning javascript builtin StringPrototypeBig( js-implicit context: NativeContext, receiver: JSAny)( ...arguments): String { return CreateHTML( receiver, 'String.prototype.big', 'big', kEmptyString, kEmptyString); } // https://tc39.github.io/ecma262/#sec-string.prototype.blink @incrementUseCounter('v8::Isolate::kHtmlWrapperMethods') transitioning javascript builtin StringPrototypeBlink( js-implicit context: NativeContext, receiver: JSAny)( ...arguments): String { return CreateHTML( receiver, 'String.prototype.blink', 'blink', kEmptyString, kEmptyString); } // https://tc39.github.io/ecma262/#sec-string.prototype.bold @incrementUseCounter('v8::Isolate::kHtmlWrapperMethods') transitioning javascript builtin StringPrototypeBold( js-implicit context: NativeContext, receiver: JSAny)( ...arguments): String { return CreateHTML( receiver, 'String.prototype.bold', 'b', kEmptyString, kEmptyString); } // https://tc39.github.io/ecma262/#sec-string.prototype.fontcolor @incrementUseCounter('v8::Isolate::kHtmlWrapperMethods') transitioning javascript builtin StringPrototypeFontcolor( js-implicit context: NativeContext, receiver: JSAny)( ...arguments): String { return CreateHTML( receiver, 'String.prototype.fontcolor', 'font', 'color', arguments[0]); } // https://tc39.github.io/ecma262/#sec-string.prototype.fontsize @incrementUseCounter('v8::Isolate::kHtmlWrapperMethods') transitioning javascript builtin StringPrototypeFontsize( js-implicit context: NativeContext, receiver: JSAny)( ...arguments): String { return CreateHTML( receiver, 'String.prototype.fontsize', 'font', 'size', arguments[0]); } // https://tc39.github.io/ecma262/#sec-string.prototype.fixed @incrementUseCounter('v8::Isolate::kHtmlWrapperMethods') transitioning javascript builtin StringPrototypeFixed( js-implicit context: NativeContext, receiver: JSAny)( ...arguments): String { return CreateHTML( receiver, 'String.prototype.fixed', 'tt', kEmptyString, kEmptyString); } // https://tc39.github.io/ecma262/#sec-string.prototype.italics @incrementUseCounter('v8::Isolate::kHtmlWrapperMethods') transitioning javascript builtin StringPrototypeItalics( js-implicit context: NativeContext, receiver: JSAny)( ...arguments): String { return CreateHTML( receiver, 'String.prototype.italics', 'i', kEmptyString, kEmptyString); } // https://tc39.github.io/ecma262/#sec-string.prototype.link @incrementUseCounter('v8::Isolate::kHtmlWrapperMethods') transitioning javascript builtin StringPrototypeLink( js-implicit context: NativeContext, receiver: JSAny)( ...arguments): String { return CreateHTML( receiver, 'String.prototype.link', 'a', 'href', arguments[0]); } // https://tc39.github.io/ecma262/#sec-string.prototype.small @incrementUseCounter('v8::Isolate::kHtmlWrapperMethods') transitioning javascript builtin StringPrototypeSmall( js-implicit context: NativeContext, receiver: JSAny)( ...arguments): String { return CreateHTML( receiver, 'String.prototype.small', 'small', kEmptyString, kEmptyString); } // https://tc39.github.io/ecma262/#sec-string.prototype.strike @incrementUseCounter('v8::Isolate::kHtmlWrapperMethods') transitioning javascript builtin StringPrototypeStrike( js-implicit context: NativeContext, receiver: JSAny)( ...arguments): String { return CreateHTML( receiver, 'String.prototype.strike', 'strike', kEmptyString, kEmptyString); } // https://tc39.github.io/ecma262/#sec-string.prototype.sub @incrementUseCounter('v8::Isolate::kHtmlWrapperMethods') transitioning javascript builtin StringPrototypeSub( js-implicit context: NativeContext, receiver: JSAny)( ...arguments): String { return CreateHTML( receiver, 'String.prototype.sub', 'sub', kEmptyString, kEmptyString); } // https://tc39.github.io/ecma262/#sec-string.prototype.sup @incrementUseCounter('v8::Isolate::kHtmlWrapperMethods') transitioning javascript builtin StringPrototypeSup( js-implicit context: NativeContext, receiver: JSAny)( ...arguments): String { return CreateHTML( receiver, 'String.prototype.sup', 'sup', kEmptyString, kEmptyString); } }