Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [2.0.1](https://github.com/rdkcentral/rdkNativeScript/compare/2.0...2.0.1)

- RDKEMW-11507: Viper IPA not working with rdknative widget [`#100`](https://github.com/rdkcentral/rdkNativeScript/pull/100)
- Merge tag '2.0' into develop [`51a0410`](https://github.com/rdkcentral/rdkNativeScript/commit/51a04109cb17643687722ed8b96da89929791cfb)

#### [2.0](https://github.com/rdkcentral/rdkNativeScript/compare/1.0.10...2.0)

- RDKEMW-9355: Add Support to run app widgets in different contexts wit… [`#90`](https://github.com/rdkcentral/rdkNativeScript/pull/90)
Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ set(JSRUNTIME_CONTAINER_FILES
)
set(JSRUNTIME_FILES
${JSRUNTIME_COMMON_SOURCE_DIRECTORY}/JSRuntimeContainer.cpp
${JSRUNTIME_COMMON_SOURCE_DIRECTORY}/NativeJSLogger.cpp
)

set(JSRUNTIME_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/include/${JSRUNTIME_ENGINE_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/include/linux ${CMAKE_CURRENT_SOURCE_DIR}/src/jsc/jsc_lib ${JSRUNTIME_ENGINE_INCLUDE_DIRECTORIES})
Expand Down Expand Up @@ -212,7 +213,7 @@ if (BUILD_JSRUNTIME_CONTAINER)
add_dependencies(jsruntime_container ${JSRUNTIMECONTAINER_LIBRARY_NAME})
target_include_directories(jsruntime_container PRIVATE ${JSRUNTIME_INCLUDE_DIRECTORIES})
set_target_properties(jsruntime_container PROPERTIES OUTPUT_NAME "JSRuntimeContainer")
target_link_libraries(jsruntime_container ${JSRUNTIME_LIBRARY_LINK_DIRECTORIES} -l${JSRUNTIMECONTAINER_LIBRARY_NAME} -lpthread)
target_link_libraries(jsruntime_container ${JSRUNTIME_LIBRARY_LINK_DIRECTORIES} -l${JSRUNTIMECONTAINER_LIBRARY_NAME} ${JSRUNTIME_LINK_ETHANLIB} -lpthread)

endif (BUILD_JSRUNTIME_CONTAINER)

Expand Down
76 changes: 74 additions & 2 deletions src/jsc/modules/windowwrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ try
{
window = jsdom.window;
window.location = {"href":"", "host":"127.0.0.1", "protocol":"http"}
/*

window.frames = []
window.screen = {
"width":1920,
Expand All @@ -32,7 +32,79 @@ try
"availHeight":1080
}
screen = window.screen;
*/

var BlobPolyfill = function(parts, options)
{
parts = parts || [];
options = options || {};
this.size = 0;
this.type = options.type || '';
this._parts = parts;

for (var i = 0; i < parts.length; i++)
{
if (typeof parts[i] === 'string')
{
this.size += parts[i].length;
}
else if (parts[i] && parts[i].byteLength)
{
this.size += parts[i].byteLength;
}
}
};

BlobPolyfill.prototype.slice = function(start, end, contentType)
{
return new BlobPolyfill(this._parts, { type: contentType || this.type });
};

BlobPolyfill.prototype.text = function()
{
var text = '';
for (var i = 0; i < this._parts.length; i++)
{
if (typeof this._parts[i] === 'string')
{
text += this._parts[i];
}
}
return Promise.resolve(text);
};

BlobPolyfill.prototype.arrayBuffer = function()
{
return Promise.resolve(new ArrayBuffer(0));
};

if (typeof global.Blob === 'undefined') {
global.Blob = BlobPolyfill;
}
if (typeof window !== 'undefined' && typeof window.Blob === 'undefined') {
window.Blob = BlobPolyfill;
}
if (typeof self !== 'undefined' && typeof self.Blob === 'undefined') {
self.Blob = BlobPolyfill;
}
if (typeof this !== 'undefined' && typeof this.Blob === 'undefined') {
this.Blob = BlobPolyfill;
}
if (typeof window !== 'undefined') {

if (!window.top) window.top = window;
if (!window.parent) window.parent = window;

if (!window.__tcfapi) {
window.__tcfapi = function(cmd, ver, callback) {
if (callback) callback({gdprApplies: false}, true);
};
}
if (!window.__uspapi) {
window.__uspapi = function(cmd, ver, callback) {
if (callback) callback({uspString: '1---'}, true);
};
}
}
}
}
catch(err)
Expand Down