| 1242 | == [InterfaceName](i) == #InterfaceName |
| 1243 | |
| 1244 | Summary: If you want to expose a different interface name to JavaScript, you can specify the name by [InterfaceName]. |
| 1245 | |
| 1246 | Usage: The possible usage is [InterfaceName=X], where X is the interface name exposed to JavaScript. |
| 1247 | [InterfaceName] can be specified on interfaces: |
| 1248 | {{{ |
| 1249 | interface [ |
| 1250 | InterfaceName=Window |
| 1251 | ] DOMWindow { |
| 1252 | }; |
| 1253 | }}} |
| 1254 | |
| 1255 | Without [InterfaceName=...], the interface name exposed to JavaScript becomes the same as the interface name in an IDL file. |
| 1256 | If you want change it based on the spec, you can use [InterfaceName=...]. |
| 1257 | In the above example, 'window.Window' will exist in JavaScript. |
| 1258 | |