Questions tagged as 'javascript'

2
answers

Readability of javascript codes

When writing a code you should do it so that the time required for your understanding is minimal. This is the most important metric for having readable code and is the foundation of the fundamental readability theorem. The longer you spend, t...
asked by 19.06.2017 / 12:42
1
answer

Write on the Javascript screen

I need to make an area on the form that the user digitally signs with a touch screen pen to store the signature of the same. As if he were writing on paper but on screen. I read about the Canvas but I just learned to make lines, rectangles...
asked by 02.03.2017 / 20:20
3
answers

Position caption above div

I'm using the bootstrap carousel with caption. Between the slide image and the caption there is a div with the image of an orange triangle. I need the caption to stay above the triangle. I have already used z-index but I can not position this ca...
asked by 22.06.2017 / 23:22
3
answers

What is the difference between Promises and Observables?

Can anyone explain the difference between Promises and Observables? I would like to understand the advantages and disadvantages of each. Which is more performative, which applies a best practice for development and etc. Thanks!     
asked by 25.05.2017 / 04:59
1
answer

Change address bar url without refreshing the page

I'm developing an application where a form with a series of <select> sends information to a chart loaded via AJAX. I would like these filters to reflect in the browser url, to make it easier for the user to favor the most commonl...
asked by 11.09.2014 / 15:48
1
answer

Get the previous URL with javascript

How do I get the previous URL of the current page in javascript?     
asked by 12.12.2014 / 17:19
2
answers

Calling the Javascript function from the parent file from within an iframe

I have 2 files: index.html iframe.html The file index.html has an iframe ( iframe.html ). There is a javascript function in the file index.html function testePai(){ console.log("teste da função...
asked by 07.05.2014 / 19:21
6
answers

How to do an array subtraction

Assuming I have an array let arr1 = [ {nome: 'Fulano', idade: 19}, {nome: 'Ciclano',idade: 20}, {nome: 'João', idade: 20}, {nome: 'Maria', idade: 30}, {nome: 'Teste', idade: 52} ] I have another let arr2 =...
asked by 23.02.2018 / 20:56
2
answers

What are slots and "scoped slots" in Vue.js?

In Vue.js we can pass descendants to a component as follows: <meu-componente> <div>Um descendente</div> <div>Outro descendente</div> </meu-componente> How does this work and what is the relationsh...
asked by 25.08.2017 / 21:28
5
answers

What is CDN and how to enable it in my JavaScript files?

On a performance verification site I received the "Use CDN for all static assets" message for my JavaScript files. What are CDNs and how to implement them?     
asked by 29.11.2016 / 18:42