| Index: client/dom/scripts/generator.py
|
| diff --git a/client/dom/scripts/generator.py b/client/dom/scripts/generator.py
|
| index 32fcbb61733bc0b553ea0439e7244533f69fdaaa..6239fc89f8c8e422717e99b494aa12ab378cb571 100644
|
| --- a/client/dom/scripts/generator.py
|
| +++ b/client/dom/scripts/generator.py
|
| @@ -137,6 +137,36 @@ _alternate_methods = {
|
| ('WheelEvent', 'initWheelEvent'): ['initWebKitWheelEvent', 'initWheelEvent']
|
| }
|
|
|
| +#
|
| +# Custom native bodies for frog implementations of dom operations that appear in
|
| +# dart:dom and dart:html. This is used to work-around the lack of a 'rename'
|
| +# feature in the 'native' string - the correct name is available on the DartName
|
| +# extended attribute. See Issue 1814
|
| +#
|
| +_dom_frog_native_typed_array_set_operation = """
|
| +if (offset == null) return this.set(array);
|
| +return this.set(array, offset);"""
|
| +
|
| +dom_frog_native_bodies = {
|
| + 'IDBCursor.continueFunction':
|
| + """
|
| +if (key == null) return this['continue']();
|
| +return this['continue'](key);
|
| +""",
|
| + 'IDBIndex.getObject': """return this.get(key);""",
|
| + 'IDBObjectStore.getObject': """return this.get(key);""",
|
| + 'Float32Array.setElements': _dom_frog_native_typed_array_set_operation,
|
| + 'Float64Array.setElements': _dom_frog_native_typed_array_set_operation,
|
| + 'Int16Array.setElements': _dom_frog_native_typed_array_set_operation,
|
| + 'Int32Array.setElements': _dom_frog_native_typed_array_set_operation,
|
| + 'Int8Array.setElements': _dom_frog_native_typed_array_set_operation,
|
| + 'Uint16Array.setElements': _dom_frog_native_typed_array_set_operation,
|
| + 'Uint32Array.setElements': _dom_frog_native_typed_array_set_operation,
|
| + 'Uint8Array.setElements': _dom_frog_native_typed_array_set_operation,
|
| + 'Uint8ClampedArray.setElements': _dom_frog_native_typed_array_set_operation,
|
| +}
|
| +
|
| +
|
| def ConvertPrimitiveType(type_name):
|
| if type_name.startswith('unsigned '):
|
| type_name = type_name[len('unsigned '):]
|
|
|