ContentRatingLevelTmGlue
表示特定评级系统的评级范围内的评级等级。
实现
构造函数
new ContentRatingLevelTmGlue()
new ContentRatingLevelTmGlue(
ratingsSystem,rating):ContentRatingLevelTmGlue
参数
ratingsSystem
string
rating
string
返回值
属性
rating
readonlyrating:string
返回评级的唯一识别密钥,该评级是ratingsSystem返回的评级系统中的有效评级。
待办事项
- 指向有关所支持评级系统的评级量表的文档
实现
ratingsSystem
readonlyratingsSystem:string
返回“评级系统”(一种特定的行业评级标准)的唯一识别密钥。
待办事项
- 指向支持的评级系统的文档
实现
IContentRatingLevel.ratingsSystem
方法
isLessOrEquallyRestrictiveThan()
isLessOrEquallyRestrictiveThan(
other):Promise<boolean>
比较两个评级等级,以确定一个等级的限制程度是小于还是等于另一个等级。请注意,这是IContentRatingLevel对象域的部分函数;只能比较相同评级系统的评级等级。
参数
other
返回值
Promise<boolean>
如果和其他对象相比此对象的限制较少则为true,若相等则为false。
抛出
尝试比较来自不同评级系统的评级等级时引发NoncomparableRatingsError。
示例
Given a={us_mpaa, G} and b={us_mpaa, PG-13}:
- `a->isLessOrEquallyRestrictiveThan(b) => true`
- `b->isLessOrEquallyRestrictiveThan(a) => false`
- `a->isLessOrEquallyRestrictiveThan(a) => true`
Given c={us_tv, TV-Y}:
- `a->isLessOrEquallyRestrictiveThan(c) => 引发NoncomparableRatingsError`
- `c->isLessOrEquallyRestrictiveThan(a) => 引发NoncomparableRatingsError`
实现
IContentRatingLevel.isLessOrEquallyRestrictiveThan
Last updated: 2025年10月2日

