Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose classes, modules and methods to js
- Loading branch information
Showing
1 changed file
with
9 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,15 @@ def alias_native(mid, jsid) | |
`#{self}._proto['$' + mid] = #{self}._proto[jsid]` | ||
end | ||
|
||
def native_alias(jsid, mid) | ||
This comment has been minimized.
Sorry, something went wrong. |
||
`#{self}._proto[jsid] = #{self}._proto['$' + mid]` | ||
end | ||
|
||
def native_module! | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
elia
Author
Member
|
||
`Opal.global[#{self.name}] = #{self}` | ||
end | ||
alias native_class! native_module! | ||
|
||
def ancestors | ||
%x{ | ||
var parent = #{self}, | ||
|
Why isn't there a bang?
native_alias!
would be in line withnative_module!
.