From DHTML to DOM Scripting
WEBINAR: On-demand webcast
How to Boost Database Development Productivity on Linux, Docker, and Kubernetes with Microsoft SQL Server 2017 REGISTER >
One problem is that some in-between versions of Opera support the getElementById object, but fail to support the entire W3C DOM. To determine whether this is the case, test for support of the createTextNode as well:
Progressive EnhancementProgressive enhancement is the practice of providing functionality only to those who can see and use it by starting with a lowest common denominator and then testing whether successive improvements are supported. Users who don't have the capability to support those higher features will still be able to use the web site perfectly adequately. A comparable real-life process is to put on your clothes in the morning:
- You start with a naked body that is hopefully in full working condition--or at least in the same condition as it was yesterday, so that it is no shock to you (we discount PJs and/or underwear to keep this example easy).
- You may have a wonderful nude body, but it is insufficient in cold weather and might not appeal to other people around you--you'll need something to cover it with.
- If there are clothes available, you can check which fit the weather, your mood, the group of people you'll be seeing this day, and whether the different garments are in good order, clean, and are the right sizes.
- You put them on, and you can face the day. If you want to, you can start accessorizing, but please make sure to take other people into consideration when doing so (too much perfume might not be a good idea in a crowded train carriage).
- We start with a valid, semantically correct (X)HTML document with all the content--including relevant images with text alternatives as alt attributes--and a meaningful structure.
- We add a style sheet to improve this structure's appearance, legibility, and clarity--possibly we even add some simple rollover effects to liven it up a little.
- It then tests whether all the necessary elements are available and applies the desired functionality to them.