Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
scripts.systemhtml.Dart2JSBackend Class Reference
Inheritance diagram for scripts.systemhtml.Dart2JSBackend:
scripts.htmldartgenerator.HtmlDartGenerator

Public Member Functions

def __init__ (self, interface, options, logging_level=logging.WARNING, generate_static_extensions=False)
 
def ImplementsMergedMembers (self)
 
def GenerateCallback (self, info)
 
def AdditionalImplementedInterfaces (self)
 
def NativeSpec (self)
 
def ImplementationTemplate (self)
 
def StartInterface (self, members_emitter)
 
def FinishInterface (self)
 
def HasSupportCheck (self)
 
def GetSupportCheck (self)
 
def GenerateCustomFactory (self, constructor_info)
 
def MakeFactoryCall (self, factory, method, arguments, constructor_info)
 
def IsConstructorArgumentOptional (self, argument)
 
def EmitStaticFactoryOverload (self, constructor_info, name, arguments, emitter)
 
def SecondaryContext (self, interface)
 
def HasIndexedGetter (self)
 
def AddIndexer (self, element_type, nullable)
 
def EmitAttribute (self, attribute, html_name, read_only)
 
def AmendIndexer (self, element_type)
 
def RootClassName (self)
 
def OmitOperationOverrides (self)
 
def EmitOperation (self, info, html_name, dart_js_interop=False)
 
def CustomJSMembers (self)
 
- Public Member Functions inherited from scripts.htmldartgenerator.HtmlDartGenerator
def __init__ (self, interface, options, dart_use_blink, logger)
 
def EmitSupportCheck (self)
 
def EmitEventGetter (self, events_class_name)
 
def AddMembers (self, interface, declare_only=False, dart_js_interop=False)
 
def AddSecondaryMembers (self, interface)
 
def OmitOperationOverrides (self)
 
def AddConstant (self, constant)
 
def AddAttribute (self, attribute, declare_only=False)
 
def AddOperation (self, info, declare_only=False, dart_js_interop=False)
 
def AdditionalImplementedInterfaces (self)
 
def Mixins (self)
 
def AddConstructors (self, constructors, factory_name, factory_constructor_name, constructor_emitter)
 
def EmitHelpers (self, base_class, members_emitter)
 
def DeclareAttribute (self, attribute, attr_name, read_only)
 
def DeclareOperation (self, operation, return_type_name, method_name)
 
def EmitListMixin (self, element_name, nullable)
 
def SecureOutputType (self, type_name, is_dart_type=False, can_narrow_type=False, nullable=False)
 
def SecureBaseName (self, type_name)
 
def is_DOM_type (self, type_name)
 

Detailed Description

Generates a dart2js class for the dart:html library from a DOM IDL
interface.

Definition at line 1273 of file systemhtml.py.

Constructor & Destructor Documentation

◆ __init__()

def scripts.systemhtml.Dart2JSBackend.__init__ (   self,
  interface,
  options,
  logging_level = logging.WARNING,
  generate_static_extensions = False 
)

Reimplemented from scripts.htmldartgenerator.HtmlDartGenerator.

Definition at line 1278 of file systemhtml.py.

1282 generate_static_extensions=False):
1283 super(Dart2JSBackend, self).__init__(interface, options, False, _logger)
1284
1285 self._generate_static_extensions = generate_static_extensions
1286 self._database = options.database
1287 self._template_loader = options.templates
1288 self._type_registry = options.type_registry
1289 self._renamer = options.renamer
1290 self._metadata = options.metadata
1291 self._interface_type_info = self._type_registry.TypeInfo(
1292 self._interface.id)
1293 self._interface_name = self._interface_type_info.interface_name()
1294 self._current_secondary_parent = None
1295 self._library_name = self._renamer.GetLibraryName(self._interface)
1296 # Global constants for all WebGLRenderingContextBase, WebGL2RenderingContextBase, WebGLDrawBuffers
1297 self._gl_constants = []
1298 _logger.setLevel(logging_level)
1299

Member Function Documentation

◆ AddIndexer()

def scripts.systemhtml.Dart2JSBackend.AddIndexer (   self,
  element_type,
  nullable 
)
Adds all the methods required to complete implementation of List.

Definition at line 1440 of file systemhtml.py.

1440 def AddIndexer(self, element_type, nullable):
1441 """Adds all the methods required to complete implementation of List."""
1442 # We would like to simply inherit the implementation of everything except
1443 # length, [], and maybe []=. It is possible to extend from a base
1444 # array implementation class only when there is no other implementation
1445 # inheritance. There might be no implementation inheritance other than
1446 # DOMBaseWrapper for many classes, but there might be some where the
1447 # array-ness is introduced by a non-root interface:
1448 #
1449 # interface Y extends X, List<T> ...
1450 #
1451 # In the non-root case we have to choose between:
1452 #
1453 # class YImpl extends XImpl { add List<T> methods; }
1454 #
1455 # and
1456 #
1457 # class YImpl extends ListBase<T> { copies of transitive XImpl methods; }
1458 #
1459
1460 has_indexed_getter = self.HasIndexedGetter()
1461
1462 indexed_getter = False
1463 indexed_getter_nullable = nullable
1464 if has_indexed_getter:
1465 indexed_getter = ('JS("%s%s", "#[#]", this, index)' %
1466 (self.SecureOutputType(element_type),
1467 "|Null" if nullable else ""))
1468 else:
1469 for op in self._interface.operations:
1470 if op.id == 'getItem':
1471 indexed_getter = 'this.getItem(index)'
1472 indexed_getter_nullable = OperationTypeIsNullable(op)
1473 break
1474 if not indexed_getter:
1475 for op in self._interface.operations:
1476 if op.id == 'item':
1477 indexed_getter = 'this.item(index)'
1478 indexed_getter_nullable = OperationTypeIsNullable(op)
1479 break
1480
1481 if indexed_getter:
1482 self._members_emitter.Emit(
1483 '\n'
1484 ' $TYPE operator[](int index) {\n'
1485 ' if (JS("bool", "# >>> 0 !== # || # >= #", index,\n'
1486 ' index, index, length))\n'
1487 ' throw new IndexError.withLength(index, length, indexable: this);\n'
1488 ' return $INDEXED_GETTER$NULLASSERT;\n'
1489 ' }',
1490 INDEXED_GETTER=indexed_getter,
1491 TYPE=self.SecureOutputType(element_type,
1492 is_dart_type=False,
1493 can_narrow_type=True,
1494 nullable=nullable),
1495 # If the type of the operation is not nullable but the getter
1496 # is, we must assert non-null.
1497 NULLASSERT='!' if not nullable and indexed_getter_nullable \
1498 else '')
1499
1500 if 'CustomIndexedSetter' in self._interface.ext_attrs:
1501 self._members_emitter.Emit(
1502 '\n'
1503 ' void operator[]=(int index, $TYPE$NULLABLE value) {'
1504 ' JS("void", "#[#] = #", this, index, value); }',
1505 TYPE=self._NarrowInputType(element_type),
1506 NULLABLE='?' if nullable else '')
1507 else:
1508 theType = self._NarrowInputType(element_type)
1509 if theType == 'DomRectList':
1510 theType = ''
1511
1512 self._members_emitter.Emit(
1513 '\n'
1514 ' void operator[]=(int index, $TYPE$NULLABLE value) {\n'
1515 ' throw new UnsupportedError("Cannot assign element of immutable List.");\n'
1516 ' }\n',
1517 TYPE=theType,
1518 NULLABLE='?' if nullable else '')
1519
1520 self.EmitListMixin(self._DartType(element_type), nullable)
1521

◆ AdditionalImplementedInterfaces()

def scripts.systemhtml.Dart2JSBackend.AdditionalImplementedInterfaces (   self)

Reimplemented from scripts.htmldartgenerator.HtmlDartGenerator.

Definition at line 1306 of file systemhtml.py.

1306 def AdditionalImplementedInterfaces(self):
1307 implements = super(Dart2JSBackend,
1308 self).AdditionalImplementedInterfaces()
1309 if self._interface_type_info.list_item_type() and self.HasIndexedGetter(
1310 ):
1311 item_type = self._type_registry.TypeInfo(
1312 self._interface_type_info.list_item_type()).dart_type()
1313 if self._interface_type_info.list_item_type_nullable():
1314 item_type += '?'
1315 implements.append('JavaScriptIndexingBehavior<%s>' % item_type)
1316 return implements
1317

◆ AmendIndexer()

def scripts.systemhtml.Dart2JSBackend.AmendIndexer (   self,
  element_type 
)

Definition at line 1836 of file systemhtml.py.

1836 def AmendIndexer(self, element_type):
1837 pass
1838

◆ CustomJSMembers()

def scripts.systemhtml.Dart2JSBackend.CustomJSMembers (   self)

Definition at line 2218 of file systemhtml.py.

2218 def CustomJSMembers(self):
2219 return _js_custom_members
2220

◆ EmitAttribute()

def scripts.systemhtml.Dart2JSBackend.EmitAttribute (   self,
  attribute,
  html_name,
  read_only 
)

Definition at line 1522 of file systemhtml.py.

1522 def EmitAttribute(self, attribute, html_name, read_only):
1523 if self._HasCustomImplementation(attribute.id):
1524 return
1525
1526 if IsPureInterface(self._interface.id, self._database):
1527 self._AddAttributeUsingProperties(attribute, html_name, read_only)
1528 return
1529
1530 output_type = self.SecureOutputType(attribute.type.id,
1531 can_narrow_type=read_only,
1532 nullable=attribute.type.nullable)
1533
1534 rename = self._RenamingAnnotation(attribute.id, html_name)
1535 metadata = self._Metadata(attribute.type.id, attribute.id, output_type,
1536 attribute.type.nullable)
1537
1538 is_compat = self._mdn_reader.is_compatible(attribute)
1539
1540 # If the attribute is shadowing, we can't generate a shadowing
1541 # getter or setter (Issue 1633).
1542 # TODO(sra): _FindShadowedAttribute does not take into account the html
1543 # renaming. We should be looking for another attribute that has the
1544 # same html_name. Two attributes with the same IDL name might not match
1545 # if one is renamed.
1546 # TODO(srujzs): Determine if logic behind shadowing is still true here
1547 # and below with the transition to natives.
1548 (super_attribute,
1549 super_attribute_interface) = self._FindShadowedAttribute(attribute)
1550
1551 if super_attribute:
1552 if is_compat is None:
1553 # If there is no compatibility info on this attribute, we use
1554 # the parent attribute's compatibility info.
1555 is_compat = self._mdn_reader.is_compatible(super_attribute)
1556 self._mdn_reader.set_compatible(attribute, is_compat)
1557 if read_only or self._SafeToIgnoreShadowingMember(html_name):
1558 if attribute.type.id == super_attribute.type.id:
1559 # Compatible attribute, use the superclass property. This
1560 # works because JavaScript will do its own dynamic dispatch.
1561
1562 # Nullability is determined by attribute compatibility.
1563 nullable = not is_compat or attribute.type.nullable
1564 self._members_emitter.Emit(
1565 '\n'
1566 ' // Use implementation from $SUPER.\n'
1567 ' // $GET_TYPE get $NAME native;\n'
1568 ' // void set $NAME($SET_TYPE value) native;\n',
1569 SUPER=super_attribute_interface,
1570 NAME=html_name,
1571 GET_TYPE=self.SecureOutputType(attribute.type.id,
1572 can_narrow_type=read_only,
1573 nullable=nullable),
1574 SET_TYPE=self.SecureOutputType(attribute.type.id,
1575 can_narrow_type=read_only,
1576 nullable=nullable or \
1577 'TreatNullAs' in attribute.ext_attrs))
1578 return
1579 self._members_emitter.Emit('\n // Shadowing definition.')
1580 self._AddAttributeUsingProperties(attribute, html_name, read_only,
1581 rename, metadata)
1582 return
1583
1584 # If the attribute is shadowed incompatibly in a subclass then we also
1585 # can't just generate it as a getter/setter. In particular, this happens
1586 # with DomMatrixReadOnly and its subclass DomMatrix. Force the
1587 # superclass to generate getters. Hardcoding the known problem classes
1588 # for now.
1589 # TODO(alanknight): Fix this more generally.
1590 if (self._interface.id == 'DOMMatrixReadOnly' or
1591 self._interface.id == 'DOMPointReadOnly' or
1592 self._interface.id == 'DOMRectReadOnly'):
1593 self._AddAttributeUsingProperties(attribute, html_name, read_only,
1594 rename, metadata)
1595 return
1596
1597 # If the type has a conversion we need a getter or setter to contain the
1598 # conversion code.
1599 if (self._OutputConversion(attribute.type.id, attribute.id) or
1600 self._InputConversion(attribute.type.id, attribute.id)):
1601 self._AddAttributeUsingProperties(attribute, html_name, read_only,
1602 rename, metadata)
1603 return
1604
1605 input_type = self._NarrowInputType(attribute.type.id)
1606 if attribute.type.nullable or not is_compat:
1607 input_type += '?'
1608 if not read_only:
1609 if attribute.type.id == 'Promise':
1610 _logger.warn('R/W member is a Promise: %s.%s' %
1611 (self._interface.id, html_name))
1612 self._AddAttributeUsingProperties(attribute, html_name, read_only,
1613 rename, metadata)
1614 else:
1615 if attribute.type.id == 'Promise':
1616 lookupOp = "%s.%s" % (self._interface.id, html_name)
1617 promiseFound = _GetPromiseAttributeType(lookupOp)
1618 promiseType = 'Future'
1619 promiseCall = 'promiseToFuture'
1620 type_description = ''
1621 if promiseFound is not (None):
1622 paramType = promiseFound.get('type')
1623 if 'maplike' in promiseFound:
1624 promiseCall = 'promiseToFuture<dynamic>'
1625 promiseType = 'Future'
1626 elif paramType == 'dictionary':
1627 # It's a dictionary so return as a Map.
1628 promiseCall = 'promiseToFutureAsMap'
1629 output_conversion = self._OutputConversion("Dictionary",
1630 None)
1631 nullability = '?' if output_conversion.nullable_output \
1632 else ''
1633 promiseType = 'Future<Map<String, dynamic>' + \
1634 nullability + '>'
1635 elif paramType:
1636 promiseCall = 'promiseToFuture<%s>' % paramType
1637 promiseType = 'Future<%s>' % paramType
1638
1639 if 'creates' in promiseFound:
1640 createsType = promiseFound['creates']
1641 type_description = 'creates:%s;' % createsType
1642
1643 if attribute.type.nullable:
1644 promiseType += '?'
1645
1646 template = '\n $RENAME$(ANNOTATIONS)$TYPE get $NAME => '\
1647 '$PROMISE_CALL(JS("$TYPE_DESC", "#.$NAME", this));\n'
1648
1649 self._members_emitter.Emit(
1650 template,
1651 RENAME=rename,
1652 ANNOTATIONS=metadata,
1653 TYPE=promiseType,
1654 PROMISE_CALL=promiseCall,
1655 TYPE_DESC=type_description,
1656 NAME=html_name,)
1657 else:
1658 # Need to use a getter for list.length properties so we can
1659 # add a setter which throws an exception, satisfying List
1660 # API.
1661 if self._interface_type_info.list_item_type() and \
1662 html_name == 'length':
1663 template = (
1664 '\n $RENAME$(ANNOTATIONS)$TYPE get $NAME => ' +
1665 'JS("$TYPE", "#.$NAME", this);\n')
1666 self._members_emitter.Emit(
1667 template,
1668 RENAME=rename,
1669 ANNOTATIONS=metadata,
1670 NAME=html_name,
1671 TYPE=input_type
1672 if output_type == 'double' else output_type)
1673 else:
1674 # Transform to native getters/setters.
1675 # TODO(srujzs): Should the logic for types and doubles from
1676 # above and before stay the same here?
1677 self._AddAttributeUsingProperties(attribute, html_name,
1678 read_only, rename, metadata)
1679
static bool is_compatible(const GrSurfaceCharacterization &gsc, const GrBackendTexture &backendTex)

◆ EmitOperation()

def scripts.systemhtml.Dart2JSBackend.EmitOperation (   self,
  info,
  html_name,
  dart_js_interop = False 
)
Arguments:
info: An OperationInfo object.

Definition at line 1845 of file systemhtml.py.

1845 def EmitOperation(self, info, html_name, dart_js_interop=False):
1846 """
1847 Arguments:
1848 info: An OperationInfo object.
1849 """
1850 if self._HasCustomImplementation(info.name):
1851 return
1852
1853 if IsPureInterface(self._interface.id, self._database):
1854 self._AddInterfaceOperation(info, html_name)
1855 elif info.callback_args:
1856 self._AddFutureifiedOperation(info, html_name)
1857 else:
1858 if any(
1859 self._OperationRequiresConversions(op)
1860 for op in info.overloads):
1861 lookupOp = "%s.%s" % (self._interface.id, html_name)
1862 if (_GetPromiseOperationType(lookupOp) or info.type_name == 'Promise') and \
1863 not _IsPromiseOperationGenerateCall(lookupOp):
1864 self._AddDirectNativeOperation(info, html_name)
1865 else:
1866 # Any conversions needed?
1867 self._AddOperationWithConversions(info, html_name)
1868 else:
1869 self._AddDirectNativeOperation(info, html_name)
1870
SIT bool any(const Vec< 1, T > &x)
Definition: SkVx.h:530

◆ EmitStaticFactoryOverload()

def scripts.systemhtml.Dart2JSBackend.EmitStaticFactoryOverload (   self,
  constructor_info,
  name,
  arguments,
  emitter 
)

Definition at line 1396 of file systemhtml.py.

1397 emitter):
1398 if self._interface_type_info.has_generated_interface():
1399 # Use dart_type name, we're generating.
1400 interface_name = self._interface_type_info.interface_name()
1401 else:
1402 # Use the implementation name the interface is suppressed.
1403 interface_name = self._interface_type_info.implementation_name()
1404
1405 index = len(arguments)
1406 arguments = constructor_info.ParametersAsArgumentList(index)
1407 if arguments:
1408 arguments = ', ' + arguments
1409 (emitter if (emitter != None) else self._members_emitter).Emit(
1410 " static $INTERFACE_NAME $NAME($PARAMETERS) => "
1411 "JS('$INTERFACE_NAME', 'new $CTOR_NAME($PLACEHOLDERS)'$ARGUMENTS);\n",
1412 INTERFACE_NAME=interface_name,
1413 NAME=name,
1414 # TODO(antonm): add types to parameters.
1415 PARAMETERS=constructor_info.ParametersAsArgumentList(index),
1416 CTOR_NAME=constructor_info.name or self._interface.doc_js_name,
1417 PLACEHOLDERS=','.join(['#'] * index),
1418 ARGUMENTS=arguments)
1419
static SkString join(const CommandLineFlags::StringArray &)
Definition: skpbench.cpp:741

◆ FinishInterface()

def scripts.systemhtml.Dart2JSBackend.FinishInterface (   self)

Definition at line 1344 of file systemhtml.py.

1344 def FinishInterface(self):
1345 pass
1346

◆ GenerateCallback()

def scripts.systemhtml.Dart2JSBackend.GenerateCallback (   self,
  info 
)

Definition at line 1303 of file systemhtml.py.

1303 def GenerateCallback(self, info):
1304 pass
1305

◆ GenerateCustomFactory()

def scripts.systemhtml.Dart2JSBackend.GenerateCustomFactory (   self,
  constructor_info 
)

Definition at line 1366 of file systemhtml.py.

1366 def GenerateCustomFactory(self, constructor_info):
1367 # Custom factory will be taken from the template.
1368 return self._interface.doc_js_name in _js_custom_constructors
1369

◆ GetSupportCheck()

def scripts.systemhtml.Dart2JSBackend.GetSupportCheck (   self)
Return a tuple of the support check function signature and the support
test itself. If no parameters are supplied, we assume the default.

Definition at line 1350 of file systemhtml.py.

1350 def GetSupportCheck(self):
1351 """Return a tuple of the support check function signature and the support
1352 test itself. If no parameters are supplied, we assume the default."""
1353 if self._interface.doc_js_name in _js_support_checks_additional_element:
1354 if self._interface.doc_js_name in _svg_element_constructors:
1355 lib_prefix = 'Svg'
1356 constructors = _svg_element_constructors
1357 else:
1358 lib_prefix = ''
1359 constructors = _html_element_constructors
1360 return (js_support_checks.get(self._interface.doc_js_name) +
1361 " && (new %sElement.tag('%s') is %s)" %
1362 (lib_prefix, constructors[self._interface.doc_js_name],
1363 self._renamer.RenameInterface(self._interface)))
1364 return js_support_checks.get(self._interface.doc_js_name)
1365

◆ HasIndexedGetter()

def scripts.systemhtml.Dart2JSBackend.HasIndexedGetter (   self)

Definition at line 1426 of file systemhtml.py.

1426 def HasIndexedGetter(self):
1427 ext_attrs = self._interface.ext_attrs
1428 has_indexed_getter = 'CustomIndexedGetter' in ext_attrs
1429 for operation in self._interface.operations:
1430 if operation.id == 'item' and 'getter' in operation.specials \
1431 and not self._OperationRequiresConversions(operation):
1432 has_indexed_getter = True
1433 break
1434 if operation.id == '__getter__' and 'getter' in operation.specials \
1435 and not self._OperationRequiresConversions(operation):
1436 has_indexed_getter = True
1437 break
1438 return has_indexed_getter
1439

◆ HasSupportCheck()

def scripts.systemhtml.Dart2JSBackend.HasSupportCheck (   self)

Definition at line 1347 of file systemhtml.py.

1347 def HasSupportCheck(self):
1348 return self._interface.doc_js_name in js_support_checks
1349

◆ ImplementationTemplate()

def scripts.systemhtml.Dart2JSBackend.ImplementationTemplate (   self)

Definition at line 1322 of file systemhtml.py.

1322 def ImplementationTemplate(self):
1323 template_file = ('impl_%s.darttemplate' % self._interface.doc_js_name)
1324 template_file_content = self._template_loader.TryLoad(template_file)
1325 if not (template_file_content):
1326 if self._interface.isMaplike and self._interface.isMaplike_ro:
1327 # TODO(terry): There are no mutable maplikes yet.
1328 template_file_content = self._template_loader.Load(
1329 'dart2js_maplike_impl.darttemplate')
1330
1331 else:
1332 if CanUseStaticExtensions(self._interface_name,
1333 self._generate_static_extensions):
1334 template_file_content = self._template_loader.Load(
1335 'dart2js_static_extension_impl.darttemplate')
1336 else:
1337 template_file_content = self._template_loader.Load(
1338 'dart2js_impl.darttemplate')
1339 return template_file_content
1340
def CanUseStaticExtensions(interface, should)
Definition: systemhtml.py:21

◆ ImplementsMergedMembers()

def scripts.systemhtml.Dart2JSBackend.ImplementsMergedMembers (   self)

Definition at line 1300 of file systemhtml.py.

1300 def ImplementsMergedMembers(self):
1301 return True
1302

◆ IsConstructorArgumentOptional()

def scripts.systemhtml.Dart2JSBackend.IsConstructorArgumentOptional (   self,
  argument 
)

Definition at line 1393 of file systemhtml.py.

1393 def IsConstructorArgumentOptional(self, argument):
1394 return argument.optional
1395

◆ MakeFactoryCall()

def scripts.systemhtml.Dart2JSBackend.MakeFactoryCall (   self,
  factory,
  method,
  arguments,
  constructor_info 
)

Definition at line 1370 of file systemhtml.py.

1370 def MakeFactoryCall(self, factory, method, arguments, constructor_info):
1371 if factory is 'document' and method is 'createElement' \
1372 and not ',' in arguments \
1373 and not self._HasUnreliableFactoryConstructor():
1374 return emitter.Format(
1375 "JS$CAST("
1376 "'returns:$INTERFACE_NAME;creates:$INTERFACE_NAME;new:true',"
1377 " '#.$METHOD(#)', $FACTORY, $ARGUMENTS)",
1378 CAST='<' + self._interface_type_info.interface_name() + '>',
1379 INTERFACE_NAME=self._interface_type_info.interface_name(),
1380 FACTORY=factory,
1381 METHOD=method,
1382 ARGUMENTS=arguments)
1383 return emitter.Format('$FACTORY.$METHOD($ARGUMENTS)$CAST',
1384 FACTORY=factory,
1385 METHOD=method,
1386 ARGUMENTS=arguments,
1387 CAST=' as ' +
1388 self._interface_type_info.interface_name())
1389

◆ NativeSpec()

def scripts.systemhtml.Dart2JSBackend.NativeSpec (   self)

Definition at line 1318 of file systemhtml.py.

1318 def NativeSpec(self):
1319 native_spec = MakeNativeSpec(self._interface.javascript_binding_name)
1320 return '@Native("%s")\n' % native_spec
1321

◆ OmitOperationOverrides()

def scripts.systemhtml.Dart2JSBackend.OmitOperationOverrides (   self)

Reimplemented from scripts.htmldartgenerator.HtmlDartGenerator.

Definition at line 1842 of file systemhtml.py.

1842 def OmitOperationOverrides(self):
1843 return True
1844

◆ RootClassName()

def scripts.systemhtml.Dart2JSBackend.RootClassName (   self)

Definition at line 1839 of file systemhtml.py.

1839 def RootClassName(self):
1840 return 'JavaScriptObject'
1841

◆ SecondaryContext()

def scripts.systemhtml.Dart2JSBackend.SecondaryContext (   self,
  interface 
)

Definition at line 1420 of file systemhtml.py.

1420 def SecondaryContext(self, interface):
1421 if interface is not self._current_secondary_parent:
1422 self._current_secondary_parent = interface
1423 self._members_emitter.Emit(
1424 '\n // From $WHERE\n', WHERE=interface.id)
1425

◆ StartInterface()

def scripts.systemhtml.Dart2JSBackend.StartInterface (   self,
  members_emitter 
)

Definition at line 1341 of file systemhtml.py.

1341 def StartInterface(self, members_emitter):
1342 self._members_emitter = members_emitter
1343

The documentation for this class was generated from the following file: