Remove support for scoped static methods

This is intended to address #834 where we don't actually want methods scoped
like this! Instead we'll provide one unique accessor for the `window` object
itself.
This commit is contained in:
Alex Crichton
2018-09-17 14:01:53 -07:00
parent a7cda70253
commit c67582a315
9 changed files with 10 additions and 74 deletions

View File

@ -554,18 +554,11 @@ impl<'src> FirstPassRecord<'src> {
None => false,
};
let global = self
.interfaces
.get(self_name)
.map(|interface_data| interface_data.global)
.unwrap_or(false);
for mut import_function in self.create_getter(
identifier,
&type_.type_,
self_name,
is_static,
global,
attrs,
container_attrs,
) {
@ -581,7 +574,6 @@ impl<'src> FirstPassRecord<'src> {
&type_.type_,
self_name,
is_static,
global,
attrs,
container_attrs,
) {
@ -602,7 +594,7 @@ impl<'src> FirstPassRecord<'src> {
op_data: &OperationData<'src>,
) {
let import_function_kind = |opkind| {
self.import_function_kind(self_name, data.global, op_data.is_static, opkind)
self.import_function_kind(self_name, op_data.is_static, opkind)
};
let kind = match id {
OperationId::Constructor(ctor_name) => {