Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
yorkie committed Dec 1, 2023
1 parent ad3ec8f commit 486b5b3
Show file tree
Hide file tree
Showing 12 changed files with 59 additions and 24 deletions.
61 changes: 48 additions & 13 deletions src/living/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ export async function loadImplementations() {
{ NodeListImpl },
{ ElementImpl },
DocumentFragmentImpl,
DocumentTypeImpl,
SpatialDocumentImpl,
TextImpl,
{ DocumentTypeImpl },
{ SpatialDocumentImpl },
{ TextImpl },
HTMLCollectionImpl,
DOMTokenListImpl,
HTMLElementImpl,
{ HTMLElementImpl },
HTMLHeadElementImpl,
HTMLTitleElementImpl,
HTMLMetaElementImpl,
Expand All @@ -72,8 +72,8 @@ export async function loadImplementations() {
// CSSOM
StyleSheetListImpl,
// Events
CloseEventImpl,
CustomEventImpl,
{ CloseEventImpl },
{ CustomEventImpl },
ErrorEventImpl,
FocusEventImpl,
HashChangeEventImpl,
Expand All @@ -83,15 +83,15 @@ export async function loadImplementations() {
PopStateEventImpl,
ProgressEventImpl,
TouchEventImpl,
UIEventImpl,
{ UIEventImpl },
// Others
DOMException,
CustomElementRegistryImpl,
PerformanceImpl,
AbstractRangeImpl,
RangeImpl,
MutationObserverImpl,
MutationRecordImpl,
{ CustomElementRegistryImpl },
{ PerformanceImpl },
{ AbstractRangeImpl },
{ RangeImpl },
{ MutationObserverImpl },
{ MutationRecordImpl },
DOMRectReadOnlyImpl,
DOMRectImpl,
]) => {
Expand All @@ -100,6 +100,41 @@ export async function loadImplementations() {
implementedInterfaces.set('Node', NodeImpl);
implementedInterfaces.set('NodeList', NodeListImpl);
implementedInterfaces.set('Element', ElementImpl);
implementedInterfaces.set('DocumentFragment', DocumentFragmentImpl);
implementedInterfaces.set('DocumentType', DocumentTypeImpl);
implementedInterfaces.set('SpatialDocument', SpatialDocumentImpl);
implementedInterfaces.set('Text', TextImpl);
implementedInterfaces.set('HTMLCollection', HTMLCollectionImpl);
implementedInterfaces.set('DOMTokenList', DOMTokenListImpl);
implementedInterfaces.set('HTMLElement', HTMLElementImpl);
implementedInterfaces.set('HTMLHeadElement', HTMLHeadElementImpl);
implementedInterfaces.set('HTMLTitleElement', HTMLTitleElementImpl);
implementedInterfaces.set('HTMLMetaElement', HTMLMetaElementImpl);
implementedInterfaces.set('HTMLScriptElement', HTMLScriptElementImpl);
implementedInterfaces.set('HTMLDivElement', HTMLDivElementImpl);
implementedInterfaces.set('HTMLSpanElement', HTMLSpanElementImpl);
implementedInterfaces.set('StyleSheetList', StyleSheetListImpl);
implementedInterfaces.set('CloseEvent', CloseEventImpl);
implementedInterfaces.set('CustomEvent', CustomEventImpl);
implementedInterfaces.set('ErrorEvent', ErrorEventImpl);
implementedInterfaces.set('FocusEvent', FocusEventImpl);
implementedInterfaces.set('HashChangeEvent', HashChangeEventImpl);
implementedInterfaces.set('KeyboardEvent', KeyboardEventImpl);
implementedInterfaces.set('MessageEvent', MessageEventImpl);
implementedInterfaces.set('MouseEvent', MouseEventImpl);
implementedInterfaces.set('PopStateEvent', PopStateEventImpl);
implementedInterfaces.set('ProgressEvent', ProgressEventImpl);
implementedInterfaces.set('TouchEvent', TouchEventImpl);
implementedInterfaces.set('UIEvent', UIEventImpl);
implementedInterfaces.set('DOMException', DOMException);
implementedInterfaces.set('CustomElementRegistry', CustomElementRegistryImpl);
implementedInterfaces.set('Performance', PerformanceImpl);
implementedInterfaces.set('AbstractRange', AbstractRangeImpl);
implementedInterfaces.set('Range', RangeImpl);
implementedInterfaces.set('MutationObserver', MutationObserverImpl);
implementedInterfaces.set('MutationRecord', MutationRecordImpl);
implementedInterfaces.set('DOMRectReadOnly', DOMRectReadOnlyImpl);
implementedInterfaces.set('DOMRect', DOMRectImpl);
implementationLoaded = true;
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/living/nodes/HTMLScriptElement.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import path from 'path';
import assert from 'assert';
import vm from 'vm';
import * as BABYLON from 'babylonjs';
import BABYLON from 'babylonjs';
import * as babel from '@babel/core';
import typescriptTransformPlugin from '@babel/plugin-transform-typescript';
import commonjsTransformPlugin from '@babel/plugin-transform-modules-commonjs';
Expand Down
2 changes: 1 addition & 1 deletion src/living/nodes/ShadowRoot.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as BABYLON from 'babylonjs';
import BABYLON from 'babylonjs';
import DOMException from 'domexception';

import { NativeDocument } from '../../impl-interfaces';
Expand Down
2 changes: 1 addition & 1 deletion src/living/nodes/SpatialBoundElement.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as BABYLON from 'babylonjs';
import BABYLON from 'babylonjs';
import { NativeDocument } from '../../impl-interfaces';
import { SpatialElement } from './SpatialElement';

Expand Down
2 changes: 1 addition & 1 deletion src/living/nodes/SpatialCapsuleElement.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as BABYLON from 'babylonjs';
import BABYLON from 'babylonjs';
import { NativeDocument } from '../../impl-interfaces';
import { SpatialElement } from './SpatialElement';

Expand Down
2 changes: 1 addition & 1 deletion src/living/nodes/SpatialCubeElement.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as BABYLON from 'babylonjs';
import BABYLON from 'babylonjs';
import { NativeDocument } from '../../impl-interfaces';
import { SpatialElement } from './SpatialElement';

Expand Down
2 changes: 1 addition & 1 deletion src/living/nodes/SpatialCylinderElement.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as BABYLON from 'babylonjs';
import BABYLON from 'babylonjs';
import { NativeDocument } from '../../impl-interfaces';
import { SpatialElement } from './SpatialElement';

Expand Down
2 changes: 1 addition & 1 deletion src/living/nodes/SpatialPlaneElement.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as BABYLON from 'babylonjs';
import BABYLON from 'babylonjs';
import { NativeDocument } from '../../impl-interfaces';
import { SpatialElement } from './SpatialElement';

Expand Down
2 changes: 1 addition & 1 deletion src/living/nodes/SpatialRefElement.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as BABYLON from 'babylonjs';
import BABYLON from 'babylonjs';
import { NativeDocument } from '../../impl-interfaces';
import { SpatialElement } from './SpatialElement';

Expand Down
2 changes: 1 addition & 1 deletion src/living/nodes/SpatialSphereElement.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as BABYLON from 'babylonjs';
import BABYLON from 'babylonjs';
import { NativeDocument } from '../../impl-interfaces';
import { SpatialElement } from './SpatialElement';

Expand Down
2 changes: 1 addition & 1 deletion src/living/nodes/SpatialTorusElement.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as BABYLON from 'babylonjs';
import BABYLON from 'babylonjs';
import { NativeDocument } from '../../impl-interfaces';
import { SpatialElement } from './SpatialElement';

Expand Down
2 changes: 1 addition & 1 deletion src/living/xr/XRSession.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as BABYLON from 'babylonjs';
import BABYLON from 'babylonjs';
import DOMException from '../domexception';
import { NativeDocument } from '../../impl-interfaces';
import XRFrameImpl from './XRFrame';
Expand Down

0 comments on commit 486b5b3

Please sign in to comment.