| OLD | NEW |
| 1 APIS | 1 APIS |
| 2 ==== | 2 ==== |
| 3 | 3 |
| 4 The Sky core API | 4 The Sky core API |
| 5 ---------------- | 5 ---------------- |
| 6 | 6 |
| 7 ```javascript | 7 ```javascript |
| 8 module 'sky:core' { | 8 module 'sky:core' { |
| 9 | 9 |
| 10 // EVENTS | 10 // EVENTS |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 typedef ChildArgument (Element or Text or String); | 46 typedef ChildArgument (Element or Text or String); |
| 47 | 47 |
| 48 abstract interface Node : EventTarget { | 48 abstract interface Node : EventTarget { |
| 49 readonly attribute TreeScope? ownerScope; // O(1) | 49 readonly attribute TreeScope? ownerScope; // O(1) |
| 50 | 50 |
| 51 readonly attribute ParentNode? parentNode; // O(1) | 51 readonly attribute ParentNode? parentNode; // O(1) |
| 52 readonly attribute Element? parentElement; // O(1) // if parentNode isn't an
element, returns null | 52 readonly attribute Element? parentElement; // O(1) // if parentNode isn't an
element, returns null |
| 53 readonly attribute ChildNode? previousSibling; // O(1) | 53 readonly attribute ChildNode? previousSibling; // O(1) |
| 54 readonly attribute ChildNode? nextSibling; // O(1) | 54 readonly attribute ChildNode? nextSibling; // O(1) |
| 55 | 55 |
| 56 // the following all throw is parentNode is null | 56 // the following all throw if parentNode is null |
| 57 void insertBefore(ChildArgument... nodes); // O(N) in number of arguments pl
us all their descendants | 57 void insertBefore(ChildArgument... nodes); // O(N) in number of arguments pl
us all their descendants |
| 58 void insertAfter(ChildArgument... nodes); // O(N) in number of arguments plu
s all their descendants | 58 void insertAfter(ChildArgument... nodes); // O(N) in number of arguments plu
s all their descendants |
| 59 void replaceWith(ChildArgument... nodes); // O(N) in number of descendants p
lus arguments plus all their descendants | 59 void replaceWith(ChildArgument... nodes); // O(N) in number of descendants p
lus arguments plus all their descendants |
| 60 void remove(); // O(N) in number of descendants | 60 void remove(); // O(N) in number of descendants |
| 61 Node cloneNode(Boolean deep); // O(1) if deep=false, O(N) in the number of d
escendants if deep=true | 61 Node cloneNode(Boolean deep); // O(1) if deep=false, O(N) in the number of d
escendants if deep=true |
| 62 | 62 |
| 63 // called when parentNode changes | 63 // called when parentNode changes |
| 64 virtual void parentChangeCallback(ParentNode? oldParent, ParentNode? newPare
nt, ChildNode? previousSibling, ChildNode? nextSibling); // O(N) in descendants
(calls attached/detached) | 64 virtual void parentChangeCallback(ParentNode? oldParent, ParentNode? newPare
nt, ChildNode? previousSibling, ChildNode? nextSibling); // O(N) in descendants
(calls attached/detached) |
| 65 virtual void attachedCallback(); // noop | 65 virtual void attachedCallback(); // noop |
| 66 virtual void detachedCallback(); // noop | 66 virtual void detachedCallback(); // noop |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 magical imports: | 307 magical imports: |
| 308 the core mojo fabric JS API sky:mojo:fabric:core | 308 the core mojo fabric JS API sky:mojo:fabric:core |
| 309 the asyncWait/cancelWait mojo fabric JS API (interface to IPC thread) sky:moj
o:fabric:ipc | 309 the asyncWait/cancelWait mojo fabric JS API (interface to IPC thread) sky:moj
o:fabric:ipc |
| 310 the mojom for the shell, proxying through C++ so that the shell pipe isn't exp
osed sky:mojo:shell | 310 the mojom for the shell, proxying through C++ so that the shell pipe isn't exp
osed sky:mojo:shell |
| 311 the sky API sky:core | 311 the sky API sky:core |
| 312 ``` | 312 ``` |
| 313 | 313 |
| 314 TODO(ianh): determine if we want to separate the "this" from the | 314 TODO(ianh): determine if we want to separate the "this" from the |
| 315 Document, especially for Modules, so that exposing a module's element | 315 Document, especially for Modules, so that exposing a module's element |
| 316 doesn't expose the module's exports attribute. | 316 doesn't expose the module's exports attribute. |
| OLD | NEW |