JavaScript: Difference between revisions

Content deleted Content added
History: Use {{cite journal}} and add URL for new ref
AnomieBOT (talk | contribs)
Rescuing orphaned refs ("computerworld" from rev 488778446)
Line 272:
A web browser is by far the most common host environment for JavaScript. Web browsers typically use the public [[application programming interface|API]] to create "host objects" responsible for reflecting the [[Document Object Model]] (DOM) into JavaScript. The [[web server]] is another common application of the engine. A [[Server-side JavaScript|JavaScript webserver]] would expose host objects representing an [[HTTP]] request and response objects, which a JavaScript program could then manipulate to dynamically generate web pages.
 
Because JavaScript is the only language that the most popular browsers share support for, it has become a [[target language (computing)|target language]] for many frameworks in other languages, even though JavaScript was never intended to be such a language.<ref name="computerworld">{{cite web|last=Hamilton|first=Naomi|url=http://www.computerworld.com.au/article/255293/-z_programming_languages_javascript|title=The A-Z of Programming Languages: JavaScript|publisher=computerworld.com.au|date=2008-06-31}}</ref> Despite the performance limitations inherent to its dynamic nature, the increasing speed of JavaScript engines has made the language a surprisingly feasible compilation target.
 
=== Example script ===