but how about this scenario, and anyone can chime in on this. say you have scriptA and scriptB, and you wrap scriptA in a closure so scriptB has a harder time reading it's local variables. you can't afaik reasonably stop scriptB from just downloading scriptA and using some clever regexp (or other) to extract the data it wants
@rlemon I should have clarified the plugins are pages basically not scripts. They could run in an iframe just fine. The iframe can make API requests to sensitive data, if I can restrict the network requests the iframe can make. This way the iframe code can only interact with whitelisted servers.
This has to stop. https://www.google.com/search?q=movie+posters+with+the+actors+names+out+of+order&rlz=1C1CHBF_enUS736US736&tbm=isch&tbo=u&source=univ&sa=X&ved=0ahUKEwi6l5Xq7rDZAhVEmlkKHWHfANwQsAQIWA&biw=1847&bih=932#imgrc=_
anybody know why when i capture the let i initiliazition variable in a function inside a for loop it works correctly? i get why a var i doesnt but dont get why let does?
I'm not sure I'm going to explain this with technical accuracy, but basically when you create the closure in the loop the value of i is scoped there, so the closure doesn't see or get any other value of i
because each iteration of the for loop will have a new scoped value of i
What shall I use to execute my functions after the page has loaded: <body onload="script();">, document.onload = function(){}, window.onload = function(){}, window.addEventListener("load", function(){}); or <script src="script.js" defer></script>. There are a lot of diferents ways :(
Hello, can anyone tell me how to make a constructor in javascript that accepts an array of group objects or if nothing is passed - defaults to an empty array in javascript as javascript does not accept constructor overloading
@JavaDeveloper Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
@KendallFrey Yeah, lots of stuff I didn't agree with, but I think Sam did a pretty good job at being a host while still clarifying seemingly bad arguments
I'm trying to make global function to be able to use same function in different methods.
Here are my codes:
First I created my global js class.
import axios from "axios";
class GlobalFunction {
constructor(){
}
async selectNames(name){
await axios.get(`/Employees/GetName?...
@Yitzchok Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
question for all the react devs out there...using something like redux, would it be bad practice to keep all imported components in a state map? And then refer to the mapped state to call components without having to import them
I have a div inside which I have input (which has jquery autocomplete). I refresh this div using .load method and after that autocomplete on the input is not working. I tried document.ready, window.ready, live is deprecated. How to get Jquery autocomplete to work?
I need some help in angular ui ,I have checked routes
I wrote this hyperlink it doesn't work and it doesn't even seem to be a hyperlink (angular ui bootstrap framework)
<li class= "{{laptops}}"><a ui-sref="store.elec.Laptops" ng-click="laptops='active';Tvs='';Food=''" data-toggle="tab" >Laptops</a></li>