Blog.init();


A technical blog on Computer Science and Software Development topics by Tomás Pérez.


Tag: javascript


  1. Unit testing capabilities using advanced ES6 features

    Unit testing is a fundamental part of any development process. It’s a key tool that helps us to scale and balance maintainability and extensibility in large and diverse code repositories. The challenge: legacy components Ideally unit tests are contained and easy to write, and you can apply TDD because…

    javascript, es2015

  2. Cross-Site Tracing (XST) attacks

    A common pattern in Cross Site Scripting attacks requires to access to a victim's document.cookie object in order to hijack their session information. A common countermeasure is to tag the cookies that store session data as HttpOnly so they can be read only by the server side of the…

    javascript, security

  3. Maps in Harmony

    In old-school Javascript key/value storages can be defined using simple objects {}, however performance wise have some drawbacks compared to the new data structures present in Harmony: Maps and Sets. The Map object is a simple key/value map, any value (objects or primitives) can be used as either a…

    javascript, data structures

  4. Android and JS through addJavascriptInterface

    In the Android world, the object WebView provides a way to display embedded webpages in your mobile application, without needing to launch the external browser. It uses internally the WebKit rendering engine and provides several useful methods that you can use to control the interaction. Including a method to expose…

    javascript, android, security, mobile

  5. Local storage and the onstorage event

    Every browser that supports local storage, exposes a new event in the window object called storage, so you can attach callbacks to it and be notified of changes. This is great, and you can use now cool features like communication between multiple tabs of your browser, just setting values on…

    javascript, browsers, local storage