Skip to content

Commit

Permalink
chore: add comments to note internal APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdurdin committed Oct 24, 2023
1 parent f3333bf commit 8aee151
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion developer/src/server/src/site/packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ menuDropdown.onclick = (value) => {
menuDropdown.set(''); // we never show an 'active' package
if(value == '#install-keyman') {
let href = '';
switch(keyman.config.hostDevice.OS) {
switch(keyman.config.hostDevice.OS) { // note: KeymanWeb internal API
case 'ios': href = 'https://keyman.com/go/developer/'+versionMajor+'/ios-app'; break;
case 'android': href = 'https://keyman.com/go/developer/'+versionMajor+'/android-app'; break;
case 'linux': href = 'https://keyman.com/linux/download'; break;
Expand Down
14 changes: 7 additions & 7 deletions developer/src/server/src/site/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,14 @@ window.onload = function() {

if(newOSK) {
document.getElementById('osk-host').removeChild(newOSK.element);
keyman.osk = null;
keyman.osk = null; // Note: undocumented KeymanWeb API
}

// Create a new on screen keyboard view and tell KeymanWeb that
// we are using the targetDevice for context input.
newOSK = new keyman.views.InlinedOSKView(keyman, { device: targetDevice });
keyman.core.contextDevice = targetDevice;
keyman.osk = newOSK;
newOSK = new keyman.views.InlinedOSKView(keyman, { device: targetDevice }); // Note: KeymanWeb internal API
keyman.core.contextDevice = targetDevice; // Note: KeymanWeb internal API
keyman.osk = newOSK; // Note: undocumented KeymanWeb API

if(document.body.offsetWidth < targetDevice.dimensions[0]) {
newOSK.setSize('320px', '200px');
Expand All @@ -237,8 +237,8 @@ window.onload = function() {

keyman.addEventListener('keyboardchange', function(keyboardProperties) {
if(newOSK) {
keyman.osk = newOSK;
newOSK.activeKeyboard = keyman.contextManager.activeKeyboard; // Private API refs on both sides
keyman.osk = newOSK; // Note: undocumented KeymanWeb API
newOSK.activeKeyboard = keyman.contextManager.activeKeyboard; // Note: undocumented KeymanWeb API refs on both sides
}
keyboardDropdown.set(keyboardProperties.internalName);
window.sessionStorage.setItem('current-keyboard', keyboardProperties.internalName);
Expand Down Expand Up @@ -284,7 +284,7 @@ function unloadKeyboardsAndModels() {
const lastModel = keyman.core.activeModel;
if(lastModel) {
console.log('Unregistering model '+lastModel.id);
keyman.removeModel(lastModel.id);
keyman.removeModel(lastModel.id); // Note: undocumented KeymanWeb API
}

modelDropdown.removeAll();
Expand Down

0 comments on commit 8aee151

Please sign in to comment.