first commit
This commit is contained in:
24
node_modules/lit-html/development/directives/unsafe-svg.js
generated
vendored
Normal file
24
node_modules/lit-html/development/directives/unsafe-svg.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
import { directive } from '../directive.js';
|
||||
import { UnsafeHTMLDirective } from './unsafe-html.js';
|
||||
const SVG_RESULT = 2;
|
||||
class UnsafeSVGDirective extends UnsafeHTMLDirective {
|
||||
}
|
||||
UnsafeSVGDirective.directiveName = 'unsafeSVG';
|
||||
UnsafeSVGDirective.resultType = SVG_RESULT;
|
||||
/**
|
||||
* Renders the result as SVG, rather than text.
|
||||
*
|
||||
* The values `undefined`, `null`, and `nothing`, will all result in no content
|
||||
* (empty string) being rendered.
|
||||
*
|
||||
* Note, this is unsafe to use with any user-provided input that hasn't been
|
||||
* sanitized or escaped, as it may lead to cross-site-scripting
|
||||
* vulnerabilities.
|
||||
*/
|
||||
export const unsafeSVG = directive(UnsafeSVGDirective);
|
||||
//# sourceMappingURL=unsafe-svg.js.map
|
Reference in New Issue
Block a user