1、The type of the attribute is given by the type (matching Type) that appears after the attribute
keyword. If the Type is an identifier or an identifier followed by ?
, then the identifier must identify an interface, enumeration, callback function or typedef.
大致意思是如果:如果类型是一个标识符或者标识符后跟了?,那这个标识符必须是interface, enumeration, callback function 或者 typedef
2、The return type of the operation is given by the type (matching ReturnType) that appears before the operation’s optional identifier. A return type of void
indicates that the operation returns no value. If the return type is an identifier followed by ?
, then the identifier must identify an interface, dictionary, enumeration,callback function or typedef.
大意:如果返回类型是一个标识符后跟?,那么这个标识符必须是个interface, dictionary, enumeration,callback function 或 typedef