Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: third_party/twisted_8_1/twisted/web/woven/WebConduit2_msie.js

Issue 12261012: Remove third_party/twisted_8_1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 var InternetExplorer = navigator.appName.indexOf('Microsoft') != 1
2 function FlashConduit_swf_DoFSCommand(command, args) {
3 eval(args)
4 }
5
6 if (InternetExplorer) {
7 if (navigator.userAgent.indexOf('Windows') != -1) {
8 document.write('<SCRIPT LANGUAGE=VBScript\>\n')
9 document.write('on error resume next\n')
10 document.write('Sub FlashConduit_swf_FSCommand(ByVal command, By Val args)\n')
11 document.write('call FlashConduit_swf_DoFSCommand(command, args) \n')
12 document.write('end sub\n')
13 document.write('</SCRIPT\>\n')
14 }
15
16 }
17
18 var woven_eventQueue = []
19 woven_eventQueueBusy = 0
20 woven_clientSideEventNum = 0
21
22 function woven_eventHandler(eventName, node) {
23 var eventTarget = node.getAttribute('id')
24 var additionalArguments = ''
25 for (i = 2; i<arguments.length; i++) {
26 additionalArguments += '&woven_clientSideEventArguments='
27 additionalArguments += escape(eval(arguments[i]))
28 }
29 var source = '?woven_clientSideEventName=' + eventName + '&woven_clientSideE ventTarget=' + eventTarget + additionalArguments + '&woven_clientSideEventNum=' + woven_clientSideEventNum
30 woven_clientSideEventNum += 1
31
32 woven_eventQueue = woven_eventQueue.concat(source)
33 if (!woven_eventQueueBusy) {
34 woven_sendTopEvent()
35 }
36 return false
37 }
38
39 function woven_sendTopEvent() {
40 woven_eventQueueBusy = 1
41 var url = woven_eventQueue[0]
42 woven_eventQueue = woven_eventQueue.slice(1)
43 var input = document.getElementById('woven_inputConduit')
44
45 input.src = url
46 }
47
48 function woven_clientToServerEventComplete() {
49 if (this.woven_eventQueue.length) {
50 this.woven_sendTopEvent()
51 } else {
52 this.woven_eventQueueBusy = 0
53 }
54 var focus = document.getElementById('woven_firstResponder')
55 if (focus) {
56 focus.focus()
57 if (focus.getAttribute('clearOnFocus')) {
58 focus.value=''
59 }
60 }
61 document.scrollTop = 999999999
62 }
63
64 function woven_attemptFocus(theNode) {
65 // focus the first input element in the new node
66 if (theNode.tagName == 'INPUT') {
67 theNode.focus()
68 return 1
69 } else {
70 /* for (i=0; i<theNode.childNodes.length; i++) { */
71 /* if(woven_attemptFocus(theNode.childNodes[i])) { */
72 /* return 1 */
73 /* } */
74 /* } */
75 return 0
76 }
77 }
78
79 function woven_replaceElement(theId, htmlStr) {
80 //alert(woven_eventQueue.length)
81 var oldNode = document.getElementById(theId)
82 if (oldNode) {
83 if (oldNode.parentNode) {
84 var created = document.createElement('span')
85 created.innerHTML = htmlStr
86 if (created.firstChild) {
87 oldNode.parentNode.replaceChild(created.firstChild, oldNode)
88 var newNode = document.getElementById(theId)
89 //woven_attemptFocus(newNode)
90 }
91 }
92 }
93 }
94
95 function woven_appendChild(theId, htmlStr) {
96 var container = document.getElementById(theId)
97 var newNode = document.createElement('span')
98 newNode.innerHTML = htmlStr
99 container.appendChild(newNode.firstChild)
100 }
101
102 function woven_removeChild(theId) {
103 var theElement = document.getElementById(theId)
104 theElement.parentNode.removeChild(theElement)
105 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698