Tag: html5

How to read local file from webextension in Firefox?

As said in the subject, I need to fill a web form using data locally available as excel tables. I am already making that with a combination of python and autohotkey, but I want to have some level of JavaScript control in order to correctly handle loading times and conditionals. As a web development newbie, […]

How can I customize the caret?

I would like to customize the caret in my forms, or a contenteditable (html5) element. How can I do so?

Exempt iframes from the main document's CSP sandbox

Is it possible to exempt iframe‘s from their parents’ CSP sandbox (when the parent has its CSP sandbox enabled using the Content-Security-Policy header)? I have seen https://lists.w3.org/Archives/Public/public-webappsec/2013Jan/0027.html, but it doesn’t seem to be true. At least not any more. I’ve tried, because nothing else comes to mind, overriding the parents’ CSP header by serving the […]

Draw images on canvas locally using Chrome

I have an HTML5 app that must be run locally. When I run the app and try to load image on the canvas, on Chrome I get the error message: Unable to get image data from canvas because the canvas has been tainted by cross-origin data Both the HTML document and the images a in […]

how to reload template in ng-include angularjs

I want to reload template which I have included in page using ng-include <div ng-include=”exercise_tpl.url”></div> I am able to do this by loading blank template and the again loading previous template like this $scope.exercise_tpl.url = ‘partials/blank.html’; $(‘body’).trigger(‘click’); setTimeout(function() { $scope.exercise_tpl.url = ‘partials/memory.html’; $(‘body’).trigger(‘click’); }, 300); I want to know right way of reloading template in […]

Adding 'download' attribute to <a> dynamically using Jquery

I am trying to add the download attribute to an tag dynamically. Here is what I have so far: $(fclass).append(‘<a href=”/files/’+$days[$i][2][1]+'” download>’+$days[$i][2][0]+'</a>’); Which produces this: <a href=”/files/day0.pdf” download=””>Slideshow (Notes)</a> I also added the exact same tag as this produces into my HTML manually, but instead of <a href=”/files/day0.pdf” download=””> I used <a href=”/files/day0.pdf” download> The […]

html5 video tag not working in android phonegap

I have created application in android phonegap.I want to play video using html5 video player. My code is: <!DOCTYPE html> <html> <head> <title>Video.js | HTML5 Video Player</title> <link href=”http://vjs.zencdn.net/c/video-js.css” rel=”stylesheet” type=”text/css”> <script src=”http://vjs.zencdn.net/c/video.js”></script> </head> <body> <video id=”example_video_1″ class=”video-js vjs-default-skin” controls preload=”none” width=”640″ height=”264″ poster=”http://video-js.zencoder.com/oceans-clip.png” data-setup='{“controls”:true}’> <source src=”http://video-js.zencoder.com/oceans-clip.mp4″ type=’video/mp4′ /> <source src=”http://video-js.zencoder.com/oceans-clip.webm” type=’video/webm’ /> <source src=”http://video-js.zencoder.com/oceans-clip.ogv” […]

Create a FileList and copy it to a File input

I’m trying to create a drag and drop area that will get dataTransfer items by webkitGetAsEntry and check if the entry is a directory or file. I then would like to be able to make the files into a FileList and copy that to a file input (that will be validated and proccesed before posted). […]

Why did Safari drop support for SharedWorker?

Why did Safari drop support for SharedWorker? And are there any working polyfills using, for example, localStorage and StorageEvent as a communication port? (Yes, the shim would have to detect and recreate the master Worker)

please explain this requestAnimationFrame idiom

there are a lot of places (e.g. How to use requestAnimationFrame?) that fix window.requestAnimationFrame as below. I do not understand why the right hand side of the assignment is wrapped in to a function call. window.requestAnimFrame = (function(){ return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(callback){ window.setTimeout(callback, 1000 / 60); }; […]