Skip to content

RDKEMW-22317 : Integrate VIPA widget 1.4.4.5 with nativescript - #138

Open
gurpreet319 wants to merge 1 commit into
developfrom
topic/RDKEMW-22317
Open

RDKEMW-22317 : Integrate VIPA widget 1.4.4.5 with nativescript#138
gurpreet319 wants to merge 1 commit into
developfrom
topic/RDKEMW-22317

Conversation

@gurpreet319

Copy link
Copy Markdown
Contributor

Reason for change: Integrate VIPA 1.4.4.5 with nativescript, updated the xhr and URLSearchParams.
Test Procedure: build should be successful
Risk: low
Priority: P2

Reason for change: Integrate VIPA 1.4.4.5 with nativescript, updated the xhr and URLSearchParams.
Test Procedure: build should be successful
Risk: low
Priority: P2
Copilot AI review requested due to automatic review settings July 30, 2026 11:54
@gurpreet319
gurpreet319 requested a review from a team as a code owner July 30, 2026 11:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the JS runtime networking utilities to support integrating VIPA widget v1.4.4.5 with NativeScript, focusing on improving XMLHttpRequest behavior and expanding URLSearchParams compatibility.

Changes:

  • Refactors XMLHttpRequest.open()/send() to reset internal state more safely, parse URLs via the WHATWG URL API, and harden request/redirect handling.
  • Updates auth header creation to use Buffer.from and improves event dispatching to pass an event object to handlers/listeners.
  • Extends URLSearchParams construction to accept additional init shapes and adds iteration APIs (forEach, entries, keys, values).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
utils/xhr.js XHR state reset, URL parsing + request option construction, redirect handling, transport validation, and event dispatch behavior updates.
src/jsc/modules/lib/URLSearchParams.js Broader constructor input support and added iteration/utility methods (forEach/entries/keys/values).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread utils/xhr.js
Comment on lines 455 to +460
request.on("error", errorHandler);
if (typeof request.on === "function") {
request.on("abort", function() {
self.handleError(new Error("XMLHttpRequest: request aborted by transport"));
});
}
Comment thread utils/xhr.js
Comment on lines 553 to 555
if (typeof self["on" + event] === "function") {
self["on" + event]();
self["on" + event](evt);
}
Comment thread utils/xhr.js
Comment on lines +289 to +293
try {
var parsedUrl = new URL(urlToUse);
switch (parsedUrl.protocol) {
case "https:":
ssl = true;
@rdkcmf-jenkins

Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 1 file pending identification.

  • Protex Server Path: /home/blackduck/github/rdkNativeScript/138/rdkcentral/rdkNativeScript

  • Commit: 52de8a5

Report detail: gist'

@rdkcmf-jenkins

Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 1 file pending identification.

  • Protex Server Path: /home/blackduck/github/rdkNativeScript/138/rdkcentral/rdkNativeScript

  • Commit: 52de8a5

Report detail: gist'

@rdkcmf-jenkins

Copy link
Copy Markdown
Contributor

b'## WARNING: A Blackduck scan failure has been waived

A prior failure has been upvoted

  • Upvote reason: OK - existing id was lost

  • Commit: 52de8a5
    '

Comment thread utils/xhr.js
*
* @author Dan DeFelippi <dan@driverdan.com>
* @contributor David Ellis <d.f.ellis@ieee.org>
* @license MIT

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you have significantly changed the original DeFelippi code, it would be good to add a comment here to say something like:
"Some modifications by Comcast".
It is not strictly required by the license but nice to acknowledge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants