Changes between Version 128 and Version 129 of WebKitIDL


Ignore:
Timestamp:
Jun 28, 2013 7:52:19 AM (8 years ago)
Author:
Christophe Dumez
Comment:

Update documentation for [GlobalContext] after r152100

Legend:

Unmodified
Added
Removed
Modified
  • WebKitIDL

    v128 v129  
    14071407a corresponding property is automatically added on the ECMAScript global object by the bindings generator.
    14081408
    1409 The `[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:
    1410 * `WindowOnly`: A corresponding attribute (global constructor) will be automatically added on the `Window` interface (default if the extended attribute is omitted).
    1411 * `WorkerOnly`: A corresponding attribute (global constructor) will be automatically added on the `WorkerContext` interface.
    1412 * `WindowAndWorker`: A corresponding attribute (global constructor) will be automatically added on both the `Window` and the `WorkerContext` interfaces.
     1409`[GlobalContext=*]` is a WebKit-specific extended attribute that may only be used on interfaces that do not have the `[NoInterfaceObject]` attribute. The following values are allowed for this attribute:
     1410* `DOMWindow`: A corresponding attribute (global constructor) will be automatically added on the `DOMWindow` interface (default if the extended attribute is omitted).
     1411* `WorkerGlobalScope`: A corresponding attribute (global constructor) will be automatically added on the `WorkerGlobalScope` interface.
     1412* `SharedWorkerGlobalScope`: A corresponding attribute (global constructor) will be automatically added on the `SharedWorkerGlobalScope` interface.
     1413* `DedicatedWorkerGlobalScope`: A corresponding attribute (global constructor) will be automatically added on the `DedicatedWorkerGlobalScope` interface.
     1414
     1415It is possible to have the global constructor generated on several interfaces by specifying several interface names and separating them with a '&', for e.g. `[GlobalContext=DOMWindow&WorkerGlobalScope]`.
    14131416
    14141417Usage: `[NoInterfaceObject]` and `[GlobalContext]` can be specified on interfaces, but not at the same time.
     
    14211424    };
    14221425
    1423     // A constructor property will be generated on the global WorkerContext object
    1424     // but not the Window object.
    1425     [
    1426         GlobalContext=WorkerOnly
     1426    // A 'YYY' constructor property will be generated on the global DedicatedWorkerGlobalScope object.
     1427    [
     1428        GlobalContext=DedicatedWorkerGlobalScope
    14271429    ] interface YYY {
     1430        ...
     1431    };
     1432
     1433    // A 'ZZZ' constructor property will be generated on both the global Window object and the global WorkerGlobalScope object.
     1434    [
     1435        GlobalContext=DOMWindow&WorkerGlobalScope
     1436    ] interface ZZZ {
    14281437        ...
    14291438    };