Skip to content

Author: admin@master

PDF.js CORS issue

I’m having an issue with PDF.js and CORS configuration. From domain A I’m loading PDF.js into an iframe with a file as parameter (full path to the server, which will return a pdf document). PDF.js will create a request to the server at domain B with origin: domain A. The server at domain B returns…

Include global functions in Vue.js

In my Vue.js application I want to have some global functions. For example a callApi() function which I can call every time I need access to my data. What is the best way to include these functions so I can access it in all my components? Should I create a file functions.js and include it in my main.js? Shoul…

Application Insights secure cookies

Hi I have a WebApp on which I am using Application Insights with the Javascript SDK. In the Chrome developer tools I see that there are 2 cookier, ai_user and ai_session, which are not secure. I have already changed the code in my app to have all other cookies as secure, but I can’t manage to have these…

Google picker upload

I am trying to make a picker of Google drive that let me to upload new local files to Google Drive. The picker is working and it is showing me my Google Drive files, but there’s only the select button and there’s not a “upload” button. I added the view google.picker.DocsUploadView() bu…

hasNext() for ES6 Generator

How would I implement hasNext() method for a generator. I have tried many options like adding the generator as a return statement and yielding from the closure. Getting the first value printing it and then using the while etc, but none of them actually worked. I know I can use for of or while like How to loop…