Skip to content

Commit 44a06bd

Browse files
committed
update readme for iframe support
1 parent 02e6862 commit 44a06bd

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

.brotkeys.js.swp

-80 KB
Binary file not shown.

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,15 @@ autogenerateWithinId(containerId, generationTarget, /*optional*/ css_class_name,
214214
`containerId` - String, ID of the container element
215215
For the other arguments, see in the section on [autogenerate](#autogeneration), which is right above this one.
216216

217+
Sometimes, autogeneration will not traverse certain boundaries. For example, `container.getElementById()` will never find any elements that are within an iframe that is somewhere in the container. If you want to support your iframe (let's say it has id `ifrem`), you can do so by additionally running this after your other generations:
217218

219+
```javascript
220+
autogenerateWithinId("ifrem", manager.GenerationEnum.tag_anchor)
221+
```
222+
223+
This example will add link hints to all `<a/>` tags within that iframe.
224+
225+
Currently, iFrame support is limited to iframes that can be found with `document.getElementById()` - so no nested iFrames.
218226

219227
### Multiple HotkeyManagers
220228

brotkeys.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,6 @@ function brotkeys_autogenerate_manager_for_class_tag(css_class_name){
801801
}
802802

803803
/*
804-
TODO: scrolling with j and k
805804
TODO: add option to explicitly ignore specific elements for autogeneration
806805
TODO: add option to explicitly ignore elements for autogeneration that already have a brotkeysid from that manager
807806
TODO: add space before link hint

0 commit comments

Comments
 (0)