The answer is … you can’t! Well, generally speaking, that is.

Here are the reasons why:

  1. First things first, for security reasons, you cannot even simulate running the context menu’s Copy Image command.
  2. In Internet Explorer, you can copy a portion or all of the Canvas to an Image using document.body.createControlRange.
  3. In some later versions of Firefox, the ClipboardEvent lets you do copy an Image to clipboard.
  4. In Chrome, there is no way to do so except for some workaround using a littler helper called Flash.
  5. Then again, Flash won’t work in Safari browser.

With these findings, to provide the same consistency across browsers, it is best not to add this feature to your web application for consistency reasons which can bring confusion to some users who are not technically inclined why they will be forced to use certain browsers that only this feature works.

This was an interesting scenario that I came across with. PDF.JS by default can let you select text and copy them to the clipboard. However, since my requirement had us do with creating annotations and since it is messy to mess around the DIV layers of the PDF.JS pages, we had to create a separate Canvas element to draw out annotations in.

Now, the problem is that since there is an extra Canvas layer on top of the existing Canvas layer of PDF.JS where they draw their images if the PDF contains pictures, selecting text is not possible.

However, through a CSS attribute it is possible to let mouse clicks pass through the Canvas element using the pointer-event attribute. The values for these are auto for enabled and none for disabled.

If you plan to use Javascript, use canvas.style.pointerEvents = ‘auto|none’

There is little doubt that silicon, and the ways we have shaped it, has transformed our world and our society. Silicon, though the most common element on Earth, has gained its mainstream fame over the last 40 years due to its uses in various computer, digital and electronic devices. With just a minute of thought, there is almost nothing in your life that does not involve silicon.

But that’s just the electronics. What you may not know is that silicon actually has many more uses than just in computers, so it leads us to think, what would the world be like if there was no silicon?

Not only would computers not exist – nor smartphones or tablets, which make your briefcase or purse already a little lighter to carry – but there are even some very basic, low-tech ways that silicon would dramatically affect our lives.

In the first place, our beaches on our shores would be dramatically different, as sand is mainly silica. And if you are along coastlines, especially on the East Coast, you can look up from the beaches and see the lighthouses – they would be different too, as the windows are made from sand.  And if a lighthouse is made of cement, tat cement may no longer exist because silicon is a key element in most cement. That would mean that airport runways would break down and be unusable, and the absence of silicon would impact the airplanes themselves, as many jets use computers to fly, give information to the black box and establish a correct course and altitude for a particular route.

Silicon has a flame-retardant quality to it in that it can counterbalance oxygen. If silicon were gone, the likely would be even more oxygen available, which might be good for our breathing, but it also exposes wood and paper to higher risk of fire – even spontaneous combustion near a heat source would be possible.

Most airplanes would not work, though older planes flying over land in daylight could find their way to the ground. However, most radio communications would go out, all television and Internet capability and most GPS systems would not work. Traffic (if there were any older cars on the road) would be a nightmare because most traffic signals would not work, and trains would not operate – or ones that were older would not have many of their signals working and would put them at risk of colliding and/or derailing.

Buildings, dams, and other structures would be at great risk of collapsing and decaying without silica, and many people might be susceptible to diseases because silica is often used as a trace element in many medications. The effectiveness of these medications would be impacted, though the extent is not known.  Silica has a vital function in some medications and not in others, depending on their make-up.

Just by doing an assessment of the reach of silica, it can be seen clearly that I silicon stopped existing, there could very well be chaos and disorder all around the world because of the various uses and value that silicon has in everyday objects.

But what is silicon did not exist at all, as the initial question seems to imply? What would our world be like if we never had silicon?

Well, it might be safe to say that the world may not be so chaotic, because if the element did not exist, there could be other elements that human ingenuity could have found to use in various areas. It’s certainly possible that some electronics would work differently than we know them now, and cement would have different qualities, and maybe cars might still be analog. Not to mention microwaves and clocks.

Human ingenuity has played a role in our world being in the 21st century. But to be honest, we might still have a 198th century world if we did not have silicon. Or, if we were still in the 21st century society, it would be a more expensive world because replacing silicon with other elements that are not as common as silicon would mean great cost for those producers of modern devices. Imagine your current $15,000 car costing $30,000 or more because of silicon being replaced by some other less common element.

And your cable bill being $200 per month rather than just $100. Talk about an outrage – you would have to get on your $2,000 smartphone and give them a piece of your mind! This, interestingly, would cost no more than it does in a silicon world. So you have that going for you, which is nice.

Related Posts Plugin for WordPress, Blogger...