Pārlūkot izejas kodu

getHostDocument fix for native engine

Cedric Guillemet 5 gadi atpakaļ
vecāks
revīzija
8af4aa0b44
2 mainītis faili ar 9 papildinājumiem un 1 dzēšanām
  1. 8 0
      src/Engines/nativeEngine.ts
  2. 1 1
      src/Engines/thinEngine.ts

+ 8 - 0
src/Engines/nativeEngine.ts

@@ -293,6 +293,14 @@ export class NativeEngine extends Engine {
         }
     }
 
+    /**
+     * Gets host document
+     * @returns the host document object
+     */
+    public getHostDocument(): Nullable<Document> {
+        return null;
+    }
+
     public clear(color: Nullable<IColor4Like>, backBuffer: boolean, depth: boolean, stencil: boolean = false): void {
         var mode = 0;
         if (backBuffer && color) {

+ 1 - 1
src/Engines/thinEngine.ts

@@ -4310,7 +4310,7 @@ export class ThinEngine {
      * Gets host document
      * @returns the host document object
      */
-    public getHostDocument(): Document {
+    public getHostDocument(): Nullable<Document> {
         if (this._renderingCanvas && this._renderingCanvas.ownerDocument) {
             return this._renderingCanvas.ownerDocument;
         }