Function
isHTMLSafe Boolean public
Module: | @ember/string |
---|
Defined in packages/ember-glimmer/lib/utils/string.ts:101
import { isHTMLSafe } from '@ember/template';
- returns
- Boolean
- `true` if the string was decorated with `htmlSafe`, `false` otherwise.
Detects if a string was decorated using htmlSafe
.
import { htmlSafe, isHTMLSafe } from '@ember/string'; var plainString = 'plain string', safeString = htmlSafe('<div>someValue</div>'); isHTMLSafe(plainString); // false isHTMLSafe(safeString); // true
© 2020 Yehuda Katz, Tom Dale and Ember.js contributors
Licensed under the MIT License.
https://api.emberjs.com/ember/2.18/functions/@ember%2Ftemplate/isHTMLSafe