Changes between Version 119 and Version 120 of WebKitIDL


Ignore:
Timestamp:
Jun 4, 2013 8:26:51 AM (8 years ago)
Author:
Christophe Dumez
Comment:

Add documentation for [GlobalContext] introduced in r151169

Legend:

Unmodified
Added
Removed
Modified
  • WebKitIDL

    v119 v120  
    5454 - [#ImplementationNamespace ImplementationNamespace(i)][[br]]
    5555 - [#SkipVTableValidation SkipVTableValidation(i), ImplementationLacksVTable(i),][[br]]
    56  - [#NoInterfaceObject NoInterfaceObject(i)][[br]]
     56 - [#NoInterfaceObject NoInterfaceObject(i), GlobalContext(i)][[br]]
    5757 - [#EnabledAtRuntime EnabledAtRuntime(i)][[br]]
    5858
     
    14351435}}}
    14361436
    1437 == `[NoInterfaceObject]`(i) == #NoInterfaceObject
     1437== `[NoInterfaceObject]`(i), `[GlobalContext]`(i) == #NoInterfaceObject
    14381438
    14391439Standard: [http://dev.w3.org/2006/webapi/WebIDL/#NoInterfaceObject The spec of NoInterfaceObject]
     
    14441444* is a callback interface that has constants declared on it, or
    14451445* is a non-callback interface that is not declared with the `[NoInterfaceObject]` extended attribute,
    1446 a corresponding property is added on the global Window object by the bindings generator.
    1447 
    1448 Usage: `[NoInterfaceObject]` can be specified on interfaces.
     1446a corresponding property is automatically added on the ECMAScript global object by the bindings generator.
     1447
     1448The `[GlobalContext=WindowOnly|WorkerOnly|WindowAndWorker]` is a WebKit-specific extended attribute that may only be used on interfaces that do not have the `[NoInterfaceObject]` attribute. Three values are allowed for this attribute:
     1449* `WindowOnly`: A corresponding attribute (global constructor) will be automatically added on the `Window` interface (default if the extended attribute is omitted).
     1450* `WorkerOnly`: A corresponding attribute (global constructor) will be automatically added on the `WorkerContext` interface.
     1451* `WindowAndWorker`: A corresponding attribute (global constructor) will be automatically added on both the `Window` and the `WorkerContext` interfaces.
     1452
     1453Usage: `[NoInterfaceObject]` and `[GlobalContext]` can be specified on interfaces, but not at the same time.
    14491454
    14501455{{{
     
    14521457        NoInterfaceObject
    14531458    ] interface XXX {
     1459        ...
     1460    };
     1461
     1462    // A constructor property will be generated on the global WorkerContext object
     1463    // but not the Window object.
     1464    [
     1465        GlobalContext=WorkerOnly
     1466    ] interface YYY {
    14541467        ...
    14551468    };