Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Failed to execute 'atob' on 'Window'

Sylvain-RAug 9 2018 — edited Aug 9 2018

Hello there,

JET Version: 4.2.0

Type: Hybrid

Tests: Browser(Chrom, Safari and Firefox) and real devices (iOS and Android)

I have a bunch of code that get a Base64 html code set from a REST and stored it the rootViewModel (undecoded).

In my specified viewModel I get it back, decode it and bind it to my view as:

myViewModel:

var myBase64 = window.atob(rootViewModel.myBase64);

self.myDecodedBase64 = ko.observable(myBase64);

my view:

<div data-bind="html: myDecodedBase64"></div>

It is working fine on view loading(first time) and displays well , but when I refresh the page it throws this exception:

pastedImage_1.png

I've tried to load it on self.handleBindingsApplied, on self.handleAttached, on self.handleActivated and of course primary in my viewModel.

This base64 HTML needs to be updated in the application on the fly.

Same behaviour in browser and in real devices.

Any idea what I'm doing wrong?

Thanks in advance.

Any idea?

Comments

Post Details

Added on Aug 9 2018
2 comments
2,080 views