From f842406b6fd114c3a48e7c08292a59b7e84c4936 Mon Sep 17 00:00:00 2001 From: gsarng517_comcast Date: Wed, 25 Feb 2026 19:53:23 +0530 Subject: [PATCH] RDKEMW-14592: Nativescript widget is not working in support branch with VIPA 1.4.2 build Reason for change: updated minified jsdom with HTML APIs Test Procedure: build should be successful Risk: low Priority: P2 --- src/jsc/modules/minified_linkedjsdom.js | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/jsc/modules/minified_linkedjsdom.js b/src/jsc/modules/minified_linkedjsdom.js index cb9d064..830cb0c 100644 --- a/src/jsc/modules/minified_linkedjsdom.js +++ b/src/jsc/modules/minified_linkedjsdom.js @@ -29,6 +29,26 @@ var document = { function Event(t) { this.type = t; } Event.prototype.preventDefault = function() {}; +function HTMLElement() { + this.style = {}; + this.classList = { add: function() {}, remove: function() {}, toggle: function() {}, contains: function() { return false; } }; + this.children = []; + this.childNodes = []; +} +HTMLElement.prototype.setAttribute = function() {}; +HTMLElement.prototype.getAttribute = function() { return null; }; +HTMLElement.prototype.hasAttribute = function() { return false; }; +HTMLElement.prototype.removeAttribute = function() {}; +HTMLElement.prototype.appendChild = function(c) { this.children.push(c); this.childNodes.push(c); return c; }; +HTMLElement.prototype.removeChild = function(c) { return c; }; +HTMLElement.prototype.addEventListener = function() {}; +HTMLElement.prototype.removeEventListener = function() {}; +HTMLElement.prototype.dispatchEvent = function() {}; +HTMLElement.prototype.getBoundingClientRect = function() { return {top:0,left:0,right:0,bottom:0,width:0,height:0,x:0,y:0}; }; +HTMLElement.prototype.focus = function() {}; +HTMLElement.prototype.blur = function() {}; +HTMLElement.prototype.click = function() {}; + function DOMParser() {} DOMParser.prototype.parseFromString = function() { return document; }; @@ -114,11 +134,13 @@ var window = { clearInterval: wrappedClearInterval, addEventListener: function() {}, Event: Event, + HTMLElement: HTMLElement, DOMParser: DOMParser, Blob: Blob, AbortController: AbortController, fetch: fetch, - Promise: Promise + Promise: Promise, + frames: { length: 0 } }; window.window = window; @@ -127,6 +149,7 @@ var navigator = window.navigator; var location = window.location; window.top = window; var tv = window.tv = {}; +var HTMLElement = window.HTMLElement; var DOMParser = window.DOMParser; var Event = window.Event; var Blob = window.Blob;