From: Dawid Juszczak Date: Fri, 19 Apr 2019 08:52:17 +0000 (+0200) Subject: [fix][Content] readonly atributes since 5.5 X-Git-Tag: submit/tizen/20190510.110853~7^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0656a49430daeee533eb314b9949d1f96e9f7696;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git [fix][Content] readonly atributes since 5.5 this change prevents user from modify content.geolocation attributes [Verification] - tested on chrome console Change-Id: Ia5e887d6029124e8eb3c0830391506632db16813 Signed-off-by: Dawid Juszczak --- diff --git a/src/content/js/datatypes.js b/src/content/js/datatypes.js index 27863f6b..a4671382 100755 --- a/src/content/js/datatypes.js +++ b/src/content/js/datatypes.js @@ -354,7 +354,13 @@ function VideoContent(data) { }, geolocation: { get: function() { - return geolocation; + if (isEarlierThan55) { + return geolocation; + } else { + // for keep geolocation's latitude and longitude readonly + // we need to return copy of this object + return new tizen.SimpleCoordinates(geolocation.latitude, geolocation.longitude); + } }, set: function(v) { // since 5.5 this attribute is readonly, it is disallowed to modify it, @@ -677,7 +683,13 @@ function ImageContent(data) { }, geolocation: { get: function() { - return geolocation; + if (isEarlierThan55) { + return geolocation; + } else { + // for keep geolocation's latitude and longitude readonly + // we need to return copy of this object + return new tizen.SimpleCoordinates(geolocation.latitude, geolocation.longitude); + } }, set: function(v) { // since 5.5 this attribute is readonly, it is disallowed to modify it,