afarkas / webshim Goto Github PK
View Code? Open in Web Editor NEW[DEPRECATED] Webshims Lib is a modular capability-based polyfill-loading library
Home Page: http://aFarkas.github.com/webshim/demos/index.html
License: MIT License
[DEPRECATED] Webshims Lib is a modular capability-based polyfill-loading library
Home Page: http://aFarkas.github.com/webshim/demos/index.html
License: MIT License
form-*-ui is extremly ugly and not dry
ToDos:
code works well, but...
decouple range implementation from number implementation, time from date etc.
I'm methodically going through and testing all the MDC Canvas tutorials on FF 3 & IE 8 and am getting this error on the createPattern example on https://developer.mozilla.org/en/Canvas_tutorial/Applying_styles_and_colors
error details (from IE 8):
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; MALC)
Timestamp: Tue, 14 Dec 2010 20:24:55 UTC
Message: 'undefined' is null or not an object
Line: 59
Char: 54
Code: 0
URI: http://localhost/webshim/js-webshim/minified/shims/combined-ie8-light.js
don't know how to do with datetime-local (Two input elements)
currently there is no known way, to detect this feature.
the best way to go is to detect other features, wich are related to this missing feature. (full support of validationMessage without setCustomValidity-bug, support for required select elements, output element, datalist element etc.). but this can only be decided, if the bug was fixed: https://bugs.webkit.org/show_bug.cgi?id=28649
Hello,
I want to thank you for all of the hard work you've put into this awesome framework!
I am having some difficulty with this latest version of webshims (1.6) and rendering the form elements. I have used webforms (before 1.6) with YepNope and it worked well. Now for some reason, when I make the following call, I get nothing. Using Firebug I can confirm that the scripts have loaded, but the form elements (enhanced with webshims 1.6) do not appear to be enhanced.
I am using the following code (at the bottom of the screen):
yepnope([
// load jquery
"https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js",
// other scrips are loaded here
// load webshims 1.6
{
load : "statics/js/libs.pollyfiller.js",
callback : function() {
$.webshims.loader.basePath = "static/js/libs/shims/",
$.webshims.polyfill('forms forms-ext');
}
]);
Any help is much appreciated.
Hey Alexander,
First off, thanks for the great work!
I'd like to use webshim for a site I'm working on which has to be available in several languages. Are there any plans to internationalize webshim? I noticed jquery.validate has translations into 32 different languages. Maybe that might be of help?
Thanks for reading. =]
Josh
Environment: Safari 5.0.4 / Mac OS X 10.6.7
Expected result: displayed validity messages match the language specified by webshims.activeLang and correspond to the messages in the webshims.validityMessages object.
Observed result: displayed validity messages are taken from Safari itself. The webshims.activeLang call is disregarded.
Background: From http://diveintohtml5.org/forms.html: "Unfortunately, Safari and Chrome have shipped an incomplete implementation that may trip you up: they validate form controls, but they don’t offer any visible feedback when a form field fails validation. In other words, if you enter an invalid (or improperly formatted) date in a type="date" field, Safari and Chrome will not submit the form, but they won’t tell you why they didn’t submit the form. (They will set focus to the field that contains the invalid value, but they don’t display an error message like Opera or Firefox 4.)"
Reproduction steps:
It's an interesting question whether webshims should prefer the web site developer's chosen language/messages over the messages built in to a browser with only partial validation support. I would lean toward honoring the developers' choices (hence this bug report), but I could see how an argument could be made against. Feel free to close as invalid if appropriate.
http://afarkas.github.com/webshim/demos/demos/webforms/2-webforms-api.html change step to something below 0.5 for number demo + add tests.
depends on a first real world implementation:
https://bugs.webkit.org/show_bug.cgi?id=51071
the $.fn.prop will be new and will change a lot in webshims lib
dependency, combohandler and callback logic in current implementation has to be simplified/reduced in filesize (+use jQuery Deferred Object )
due to the fact, that parsing huge stylesheets adds a lot of overhead, only support for IE, where we can use internal stylesheet-parser. due to the fact, that polyfilled css3 properties don't always behave like native css3 properties make all properties optionally namespaced:
$.webshims.cssNamespace = '-polyfill-';
-->
-polyfill-transform: ...
$.webshims.cssNamespace = '';
-->
transform:
Libraries like webassets provide the ability to merge and compress Javascript and CSS on the fly. It would be cool if you could configure Webshims like this:
$.webshims.loader_url('/jscompressor');
and then instead of loading all the polyfills from separate requests, it would do something like:
document.write('<script src="/jscompressor?scripts=es5.js,form-core.js,...">\x3C/script>');
(It should sort the list of required scripts in the url so the server and browser can cache the response.)
This could be a good first step toward one day hosting such a service centrally on a CDN, which would allow users to always load only the shims they need with a single request without having to host Webshims themselves.
Prior art:
Thanks for considering!
use inline-block, margin: 0; float: none;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.