Posts

Showing posts with the label check

Object.defineProperty ... but Strict!

In my precedent post entitled A Pascal record via JavaScript I have showed a basic function able to emulate type hints behavior via JavaScript. Even if that was a proof of concept, I consider other languages simulation of unsupported features an error, first of all because the behavior will rarely be exactly the expected one, secondly because our curent programming language may already have something similar to better learn and use. A new ES5( direction ) As soon as I have written the Pascal example, I have realized that the good "old" Object.defineProperty , implemented in all major browsers (IE The only missing part, intrinsic in the JavaScript nature, is the property type, where this type could be eventually used for arguments or returns checks when the property is a method. My Early Attempts Back in May 2007, my JavaStrict experiment was already trying to do something similar, something implemented after 2 years even in dojo framework as well. This may tell us that ...

Hunspell for JavaScript ? A quick and dirty one: BJSpell

Image
Somebody asked me to implement a web based spell check without plug-ins or specific browsers requirement (we all know banks security policies, for example, every plug-in could be dangerous but maybe they are still using the most un-secure browser still available these days: Internet Explorer 6 ... ) My answer, straight on: Guys, there is nothing available in pure JavaScript, but I can investigate about it That's it, a couple of searches via Google , and nothing as expected ... but hey, wait a minute: what's about FireFox spell checker plug in and Open Office project? Here we are, Hunspell is the answer! BJSpell Project In a full day of self brain storming, history background cases study, and code, plus debug and tests, I created BJSpell , a basic, fast, cross browser, and runtime implementation capable to underline bad words using a pre compiled Hunspell compatible dictionary (one or more). The reason I avoided the usage of the classic " click here for the spell checke...