-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π§βπ» Add custom Janeway representation for HTML elements
- Loading branch information
Showing
1 changed file
with
32 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -914,4 +914,35 @@ Element.setMethod(function matches(selector) { | |
// Some no-ops for browser compatibility | ||
Element.setMethod(function addEventListener() {}); | ||
Element.setMethod(function removeEventListener() {}); | ||
Element.setMethod(function focus() {}); | ||
Element.setMethod(function focus() {}); | ||
|
||
/** | ||
* Custom Janeway representation (left side) | ||
* | ||
* @author Jelle De Loecker <[email protected]> | ||
* @since 2.4.0 | ||
* @version 2.4.0 | ||
* | ||
* @return {string} | ||
*/ | ||
Element.setMethod(Blast.JANEWAY_LEFT, function janewayClassIdentifier() { | ||
return this.nodeName | ||
}); | ||
|
||
/** | ||
* Custom Janeway representation (right side) | ||
* | ||
* @author Jelle De Loecker <[email protected]> | ||
* @since 2.4.0 | ||
* @version 2.4.0 | ||
* | ||
* @return {string} | ||
*/ | ||
Element.setMethod(Blast.JANEWAY_RIGHT, function janewayInstanceInfo() { | ||
|
||
if (this.id) { | ||
return '#' + this.id; | ||
} | ||
|
||
return ''; | ||
}); |